diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7ac4711..439c95c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,13 +1,8 @@ name: Release on: [workflow_dispatch] - jobs: tag: runs-on: ubuntu-latest - - outputs: - new_tag: ${{ steps.tag_version.outputs.new_tag }} - steps: - uses: actions/checkout@v2 - name: Push Tag @@ -29,7 +24,6 @@ jobs: strategy: matrix: goos: [darwin, linux, windows] - steps: - name: Checkout uses: actions/checkout@v2 @@ -47,20 +41,27 @@ jobs: node-version: "18.17.1" - name: Install NPM packages - run: cd ui && rm package-lock.json && npm install && npm run build + run: cd ui && rm package-lock.json && npm install + + - name: Build the project + run: cd ui && npm run build - name: Build Release Binary run: | - GOOS=${{ matrix.goos }} GOARCH=amd64 make GCFLAGS="-tags=prod" + echo "Building for ${{ matrix.goos }}..." + GOOS=${{ matrix.goos }} GOARCH=amd64 go build -tags=prod -o fitwave ./cmd/fitwave + ls -lh + file fitwave tar -czvf fitwave_${{ needs.tag.outputs.new_tag }}_${{ matrix.goos }}_amd64.tar.gz fitwave - ls + ls -lh - name: Upload Release Binary + id: upload-go-release-asset uses: actions/upload-release-asset@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - upload_url: ${{ needs.tag.outputs.new_tag }} + upload_url: ${{ needs.tag.outputs.upload_url }} asset_path: ./fitwave_${{ needs.tag.outputs.new_tag }}_${{ matrix.goos }}_amd64.tar.gz asset_name: fitwave_${{ needs.tag.outputs.new_tag }}_${{ matrix.goos }}_amd64.tar.gz asset_content_type: application/gzip