chore: bump cargo version #100
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: | |
push: | |
branches: | |
- "master" | |
jobs: | |
create-tag: | |
name: "Create tag" | |
runs-on: "ubuntu-latest" | |
steps: | |
- name: "Check out the repo" | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Get tags | |
run: git fetch --tags origin | |
- name: "Get tag" | |
id: "get-tag" | |
shell: "bash" | |
run: | | |
echo PKG_VERSION=$(awk -F ' = ' '$1 ~ /version/ { gsub(/["]/, "", $2);gsub("\r", "", $2); printf("%s",$2) }' Cargo.toml) >> $GITHUB_OUTPUT | |
- name: "Set Tag" | |
shell: "bash" | |
run: | | |
PKG_VERSION=${{ steps.get-tag.outputs.PKG_VERSION }} | |
PKG_VERSION=${PKG_VERSION//$'\015'} | |
if ! [ $(git tag -l v$PKG_VERSION) ]; then git tag v$PKG_VERSION && git push --tags; fi |