Skip to content

Merge pull request #11 from K9i-0/tagpr-from-0.4.2 #9

Merge pull request #11 from K9i-0/tagpr-from-0.4.2

Merge pull request #11 from K9i-0/tagpr-from-0.4.2 #9

Workflow file for this run

# .github/workflows/publish.yml
name: Publish to pub.dev
on:
push:
tags:
- '[0-9]+.[0-9]+.[0-9]+*' # for tags like: '1.2.3'
# Publish using custom workflow
jobs:
publish:
permissions:
id-token: write # Required for authentication using OIDC
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# setup OIDC token
- uses: dart-lang/setup-dart@v1
# https://github.com/dart-lang/setup-dart/blob/v1/.github/workflows/publish.yml
- name: Fetch flutter config
uses: kuhnroyal/flutter-fvm-config-action@v2
id: fvm-config-action
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ steps.fvm-config-action.outputs.FLUTTER_VERSION }}
channel: ${{ steps.fvm-config-action.outputs.FLUTTER_CHANNEL }}
cache: true
# https://github.com/actions/cache
- name: Cache dependencies
uses: actions/cache@v4
with:
path: |
${{ env.PUB_CACHE }}
${{ github.workspace }}/.packages
${{ github.workspace }}/.flutter-plugins
${{ github.workspace }}/.flutter-plugin-dependencies
${{ github.workspace }}/.dart_tool/package_config.json
key: build-pubspec-${{ hashFiles(format('{0}{1}', github.workspace, '/pubspec.lock')) }}
restore-keys: |
build-pubspec-
- name: Install dependencies
run: dart pub get
- name: Publish
run: dart pub publish --force