version/Release-version-v1.0.0-rc #4
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: Tag on Version Change | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- "version/version.txt" | |
permissions: | |
contents: write | |
jobs: | |
create_tag: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout the code | |
uses: actions/checkout@v4 | |
- name: Read version from version.txt | |
id: read_version | |
run: | | |
VERSION=$(cat version/version.txt) | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Create and push tag | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git tag -a "v${{ env.VERSION }}" -m "Release version ${{ env.VERSION }}" | |
git push origin "v${{ env.VERSION }}" |