Update main.yml #5
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 pushed | ||
id: tag | ||
uses: oprypin/[email protected] | ||
with: | ||
repository: ya27hw/equran_app | ||
releases-only: true | ||
- run: echo "${{ steps.tag.outputs.tag }}" | ||
- name: Compare Versions and Create Tag (Modified) | ||
if: ${{ 'v' + steps.get_flutter_version.outputs.version_number > steps.tag.outputs.tag }} # Modified Condition | ||
Check failure on line 29 in .github/workflows/main.yml GitHub Actions / Produce New TagInvalid workflow file
|
||
run: | | ||
VERSION=${{ steps.get_flutter_version.outputs.version_number }} | ||
git tag -a $VERSION -m "Automatic tag for version $VERSION" | ||
git push origin $VERSION |