diff --git a/.github/workflows/build-all-matrix.yaml b/.github/workflows/build-all-matrix.yaml index b3838cbe..44551ddc 100644 --- a/.github/workflows/build-all-matrix.yaml +++ b/.github/workflows/build-all-matrix.yaml @@ -167,8 +167,12 @@ jobs: name: Publish all Hooks to GitHub Releases needs: [ matrix_prep, build-hook-ensemble ] runs-on: ubuntu-latest + if: github.ref == 'refs/heads/main' steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Download built Hook artifacts uses: actions/download-artifact@v4 with: @@ -176,17 +180,36 @@ jobs: merge-multiple: true path: out + - name: Delete Tag + run: | + git tag -d latest || echo "no local tag to delete" + git push origin :latest -f || echo "no remote tag to delete" + - name: Generate Release Notes run: | - generated_release_notes=$(gh api 'repos/{owner}/{repo}/releases/generate-notes' -F tag_name=${{github.ref}} --jq .body) + generated_release_notes=$(gh api 'repos/{owner}/{repo}/releases/generate-notes' -F tag_name=latest --jq .body) cat >>"$GITHUB_ENV" <<-EOF RELEASE_NOTES<