Update README.md #1
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: "Produce New Tag" | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Get Flutter version (Optional) | |
id: get_flutter_version | |
uses: its404/[email protected] | |
- name: Output Flutter version (Optional) | |
run: echo 'version_number:' ${{ steps.get_flutter_version.outputs.version_number }} ' build_number:' ${{ steps.get_flutter_version.outputs.build_number }} | |
- name: Get Latest Tag | |
id: get_latest_tag | |
run: | | |
git fetch --depth=1 --tags | |
git describe --tags --abbrev=0 || echo "v0.0.0" | |
- name: Compare Versions and Create Tag (Modified) | |
if: ${{ steps.get_flutter_version.outputs.version_number > steps.get_latest_tag.outputs.result }} # Modified Condition | |
run: | | |
VERSION=${{ steps.get_flutter_version.outputs.version_number }} | |
git tag -a $VERSION -m "Automatic tag for version $VERSION" | |
git push origin $VERSION |