Skip to content

Fix version parsing when build number is not defined #21

Fix version parsing when build number is not defined

Fix version parsing when build number is not defined #21

Workflow file for this run

# Continuous Deployment: Publish Package to pub.dev
name: CD Publish
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+*"
# Modify the default permissions granted to GITHUB_TOKEN
permissions:
contents: write
id-token: write
pull-requests: write
jobs:
Publish:
name: publish
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- uses: subosito/flutter-action@v2
with:
channel: 'stable'
flutter-version: 3.24.3
- name: Get Id Token
uses: actions/github-script@v6
with:
script: |
let pub_token = await core.getIDToken('https://pub.dev')
core.exportVariable('PUB_TOKEN', pub_token)
- name: Authenticate
run: flutter pub pub token add https://pub.dev --env-var PUB_TOKEN
- name: Install dependencies
run: flutter pub get
- name: Dry Run
run: flutter pub publish --dry-run
- name: Publish
run: flutter pub publish --force