run release workflow on correct triggers

This commit is contained in:
Cal Bera 2025-06-24 21:52:20 -07:00
parent daf8ac4eeb
commit d09aea6456

View file

@ -2,10 +2,10 @@ name: Release
on: on:
push: push:
branches:
- "main"
tags: tags:
- "v1.*" - "v1.*"
branches:
- "release/v1.*"
jobs: jobs:
extract-version: extract-version:
@ -125,7 +125,6 @@ jobs:
name: Draft Release name: Draft Release
needs: [extract-version, linux-intel, linux-arm] needs: [extract-version, linux-intel, linux-arm]
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
env: env:
VERSION: ${{ needs.extract-version.outputs.VERSION }} VERSION: ${{ needs.extract-version.outputs.VERSION }}
permissions: permissions:
@ -134,7 +133,6 @@ jobs:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 # This is necessary for generating the changelog fetch-depth: 0 # This is necessary for generating the changelog
fetch-tags: true # Ensure tags are fetched
- name: Download all artifacts - name: Download all artifacts
uses: actions/download-artifact@v4 uses: actions/download-artifact@v4
@ -189,7 +187,7 @@ jobs:
# We just need to ensure gh release uses it correctly # We just need to ensure gh release uses it correctly
body=$(cat <<- 'ENDBODY' body=$(cat <<- 'ENDBODY'
![bera-geth](https://raw.githubusercontent.com/berachain/bera-geth/main/.github/meta/bera-geth.png) ![image](https://raw.githubusercontent.com/berachain/bera-geth/main/.github/meta/bera-geth.png)
## Summary ## Summary
@ -259,7 +257,6 @@ jobs:
# Using --target with GITHUB_SHA ensures we create the release at the right commit # Using --target with GITHUB_SHA ensures we create the release at the right commit
echo "$body" | gh release create "$RELEASE_TAG" \ echo "$body" | gh release create "$RELEASE_TAG" \
--draft \ --draft \
--target "${{ github.sha }}" \
--title "Bera-Geth $RELEASE_TAG" \ --title "Bera-Geth $RELEASE_TAG" \
-F - \ -F - \
"${assets[@]}" "${assets[@]}"