diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1870f81..56128ef 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,16 +1,15 @@ name: Build & Publish -run-name: Build ${{ github.ref_name }} +run-name: Build ${{ github.event.release.tag_name }} on: - push: - tags: - - "v*" + release: + types: [created] permissions: contents: write concurrency: - group: build-${{ github.ref_name }} + group: build-${{ github.event.release.tag_name }} cancel-in-progress: false env: @@ -45,6 +44,7 @@ jobs: steps: - uses: actions/checkout@v4 with: + ref: ${{ github.event.release.tag_name }} submodules: recursive - uses: actions/setup-go@v5 @@ -77,7 +77,8 @@ jobs: id: version shell: bash run: | - VERSION="${GITHUB_REF_NAME#v}" + VERSION="${{ github.event.release.tag_name }}" + VERSION="${VERSION#v}" echo "version=$VERSION" >> "$GITHUB_OUTPUT" echo "Building version: $VERSION" @@ -161,7 +162,7 @@ jobs: # The release was already created as a draft by semantic-release. # This step finds it by tag and attaches binaries, then publishes. draft: false - tag_name: ${{ github.ref_name }} + tag_name: ${{ github.event.release.tag_name }} fail_on_unmatched_files: true files: | artifacts/yellowjacket-linux-amd64