chore(main): release 0.1.4 (#55) #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release Next Version | |
on: | |
push: | |
branches: [main] | |
paths: ["VERSION"] | |
jobs: | |
release: | |
name: "Tag Release" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- id: check-out | |
name: "Check out code" | |
uses: actions/checkout@v3 | |
- id: current-tag | |
name: "Check latest tag" | |
run: | | |
version="$(cat VERSION | tr -d ' \n\r')" | |
echo "version=${version}" >> "${GITHUB_OUTPUT}" | |
if git rev-parse "v${version}" >/dev/null 2>&1; then | |
echo "exists=true" >> "${GITHUB_OUTPUT}" | |
fi | |
- id: create-tag | |
name: Create release tag | |
if: steps.current-tag.outputs.exists != 'true' | |
run: | | |
set -x | |
version=${{ steps.current-tag.outputs.version }} | |
tag="v${version}" | |
msg="Release ${version}" | |
git config user.name "${GITHUB_ACTOR}" | |
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com" | |
git tag -a -m "${msg}" "${tag}" | |
git push origin "${tag}" |