Skip to content

Commit c48d7ef

Browse files
authored
fix(ci): fix release workflow (#305)
* fix(ci): fix the release title * fix(ci): check the branch before running the artifact build job
1 parent 353163f commit c48d7ef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/release.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
git push --tags
6161
# When triggered by the version bump commit, build the package and publish the release artifacts.
6262
build:
63-
if: startsWith(github.event.commits[0].message, 'bump:')
63+
if: github.ref == 'refs/heads/main' && startsWith(github.event.commits[0].message, 'bump:')
6464
uses: ./.github/workflows/build.yaml
6565
permissions:
6666
contents: read
@@ -123,7 +123,7 @@ jobs:
123123
env:
124124
GH_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
125125
# Create the release including the artifacts and the SLSA L3 provenance.
126-
run: gh release create `git describe --tags --abbrev=0` dist/* ${{ needs.provenance.outputs.attestation-name }} --notes-file RELEASE_NOTES.md
126+
run: TAG=`git describe --tags --abbrev=0` && gh release create $TAG dist/* ${{ needs.provenance.outputs.attestation-name }} --title $TAG --notes-file RELEASE_NOTES.md
127127
# Uncomment the following steps to publish to a PyPI server.
128128
# At the moment PyPI does not provide a mechanism to publish
129129
# the provenance. So, users have to download the provenance from

0 commit comments

Comments
 (0)