diff --git a/.gitea/workflows/ci.yaml b/.gitea/workflows/ci.yaml index 3984b2f..5c70374 100644 --- a/.gitea/workflows/ci.yaml +++ b/.gitea/workflows/ci.yaml @@ -40,83 +40,3 @@ jobs: with: name: coverage.html path: ./cover.html - - build: - needs: test - runs-on: ubuntu-22.04 - env: - RUNNER_TOOL_CACHE: /toolcache # Runner Tool Cache - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-go@v4 - with: - go-version: '1.24.4' # The Go version to download (if necessary) and use. - - uses: https://gitea.com/actions/go-hashfiles@v0.0.1 - id: hash-go - with: - patterns: | - go.mod - go.sum - - name: Echo hash - run: echo ${{ steps.hash-go.outputs.hash }} - - name: Cache go - id: cache-go - uses: https://github.com/actions/cache@v3 # Action cache - with: # specify with your GOMODCACHE and GOCACHE - path: |- - /root/go/pkg/mod - /root/.cache/go-build - key: go_cache-${{ steps.hash-go.outputs.hash }} - restore-keys: |- - go_cache-${{ steps.hash-go.outputs.hash }} - - # build all binaries - - name: build binaries - run: | - GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -o charmite_darwin_amd64 . - GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -o charmite_darwin_arm64 . - GOOS=linux GOARCH=amd64 CGO_ENABLED=0 go build -o charmite_linux_amd64 . - GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o charmite_windows_amd64.exe . - - # upload - - name: Upload artifacts to Gitea package repository - env: - GITEA_API_URL: https://code.ppl.town/api - GITEA_TOKEN: ${{ secrets.PACKAGE_API_KEY }} - OWNER: justin - VERSION: 0.0.1 - run: | - # charmite_darwin_amd64 - curl -D- -s -X DELETE "$GITEA_API_URL/packages/$OWNER/generic/charmite/$VERSION/charmite_darwin_amd64" \ - -H "Authorization: token $GITEA_TOKEN" - - curl -D- -s -X PUT "$GITEA_API_URL/packages/$OWNER/generic/charmite/$VERSION/charmite_darwin_amd64" \ - -H "Authorization: token $GITEA_TOKEN" \ - -H "Content-Type: application/octet-stream" \ - --data-binary @charmite_darwin_amd64 - - curl -D- -s -X DELETE "$GITEA_API_URL/packages/$OWNER/generic/charmite/$VERSION/charmite_darwin_arm64" \ - -H "Authorization: token $GITEA_TOKEN" - - curl -D- -s -X PUT "$GITEA_API_URL/packages/$OWNER/generic/charmite/$VERSION/charmite_darwin_arm64" \ - -H "Authorization: token $GITEA_TOKEN" \ - -H "Content-Type: application/octet-stream" \ - --data-binary @charmite_darwin_arm64 - - curl -D- -s -X DELETE "$GITEA_API_URL/packages/$OWNER/generic/charmite/$VERSION/charmite_linux_amd64" \ - -H "Authorization: token $GITEA_TOKEN" - - curl -D- -s -X PUT "$GITEA_API_URL/packages/$OWNER/generic/charmite/$VERSION/charmite_linux_amd64" \ - -H "Authorization: token $GITEA_TOKEN" \ - -H "Content-Type: application/octet-stream" \ - --data-binary @charmite_linux_amd64 - - curl -D- -s -X DELETE "$GITEA_API_URL/packages/$OWNER/generic/charmite/$VERSION/charmite_windows_amd64.exe" \ - -H "Authorization: token $GITEA_TOKEN" - - curl -D- -s -X PUT "$GITEA_API_URL/packages/$OWNER/generic/charmite/$VERSION/charmite_windows_amd64.exe" \ - -H "Authorization: token $GITEA_TOKEN" \ - -H "Content-Type: application/octet-stream" \ - --data-binary @charmite_windows_amd64.exe - - \ No newline at end of file