Skip to content

tags updated

tags updated #4

Workflow file for this run

on:
push:
branches:
- main
name: Build and Release My App
jobs:
build:
name: Build and Release new APK
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v2
with:
distribution: 'zulu'
java-version: '11'
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
- run: flutter pub get
- run: flutter build apk --release --split-per-abi
# Get the latest tag
- name: Get latest tag
id: tag
run: echo "::set-output name=TAG::$(git describe --tags --abbrev=0)"
# Extract the version number
- name: Extract version number
id: extract_version
run: echo "::set-output name=VERSION::${{ steps.tag.outputs.TAG#*v }}"

Check failure on line 36 in .github/workflows/main.yaml

View workflow run for this annotation

GitHub Actions / Build and Release My App

Invalid workflow file

The workflow is not valid. .github/workflows/main.yaml (Line: 36, Col: 14): Unexpected symbol: 'TAG#*v'. Located at position 19 within expression: steps.tag.outputs.TAG#*v
# Increment the version number
- name: Increment version number
id: increment_version
run: echo "::set-output name=NEW_VERSION::$(echo ${{ steps.extract_version.outputs.VERSION }} | awk -F. '{$NF = $NF + 1;} 1' | sed 's/ /./g')"
# Push to Releases
- name: Push to Releases
uses: ncipollo/release-action@v1
with:
artifacts: "build/app/outputs/apk/release/*"
tag: ${{ steps.increment_version.outputs.NEW_VERSION }}
token: ${{ secrets.TOKEN }}