Merge pull request #330 from himmelblau-idm/stable-0.7.x_bug314 #39
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: Rust Version Tagging (Post-Merge) | |
on: | |
push: | |
branches: | |
- stable-0.5.x | |
- stable-0.6.x | |
- stable-0.7.x | |
permissions: | |
contents: write | |
jobs: | |
create-tag: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Set up Git for tagging | |
run: | | |
git config --global user.name "GitHub Action" | |
git config --global user.email "[email protected]" | |
- name: Extract version from Cargo.toml | |
id: get-version | |
run: | | |
VERSION=$(grep '^version =' Cargo.toml | head -n 1 | sed 's/version = "\(.*\)"/\1/') | |
echo "VERSION=$VERSION" >> $GITHUB_ENV | |
- name: Create and push a new tag | |
run: | | |
git tag "$VERSION" | |
git push origin "$VERSION" |