Push a tag after testing artifacts
Closed this issue · 1 comments
noritakaIzumi commented
Purpuse of the feature request
To reduce risk of rolling back tags with doing irreversible operation at last.
Describe the solution you'd like
In .github/workflows/create-new-release.yml
, push a tag after building artifacts and before create a release.
Additional context
None.
noritakaIzumi commented
The "push tag" job gets the current version and push a tag at the same time.
We should get the version in one job, and building-artifact jobs will need it, then push a tag and create a release.
- name: Push a tag
id: tag
run: |
version="$(hatch version)"
tag="${{ env.tag-prefix }}${version}"
git tag -a ${tag} -m "New release ${tag} (tagged by github-actions[bot])"
git push origin ${tag}
echo "version=${version}" >> $GITHUB_OUTPUT
echo "tag=${tag}" >> $GITHUB_OUTPUT
to
- name: Get current version
id: get-version
# operations...
- name: Push a tag
needs: get-version
# operations...