Update tag.yml #9
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: | |
- main | |
pull_request: | |
types: | |
- closed | |
branches: | |
- main | |
jobs: | |
tag: | |
name: add tag | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v3 | |
- name: Get current version | |
id: current_version | |
run: | | |
version=$(grep -oP '(?<=<Version>).*?(?=<\/Version>)' ./common.props) | |
echo "Curent version: $version" | |
echo "current_version=$version" >> $GITHUB_OUTPUT | |
- name: Tag and push | |
run: | | |
new_tag="${{ steps.current_version.outputs.current_version }}" | |
git tag "$new_tag" | |
git push origin "$new_tag" |