Publish to pub.dev #55
Workflow file for this run
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
# .github/workflows/publish.yml | |
name: Publish to pub.dev | |
on: | |
push: | |
tags: | |
# must align with the tag-pattern configured on pub.dev, often just replace | |
# with [0-9]+.[0-9]+.[0-9]+* | |
- 'v[0-9]+.[0-9]+.[0-9]+*' # tag-pattern on pub.dev: 'v' | |
# If you prefer tags like '1.2.3', without the 'v' prefix, then use: | |
# - '[0-9]+.[0-9]+.[0-9]+*' # tag-pattern on pub.dev: '' | |
# If your repository contains multiple packages consider a pattern like: | |
# - 'my_package_name-v[0-9]+.[0-9]+.[0-9]+*' | |
jobs: | |
publish: | |
name: Publish on pub.dev | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: Clone repository | |
uses: actions/checkout@v3 | |
# This step adds the auth token for pub.dev | |
- name: Set up Dart | |
uses: dart-lang/setup-dart@v1 | |
with: | |
sdk: stable | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
channel: stable | |
cache: true | |
- name: Publish to pub.dev | |
id: pub_release | |
uses: leancodepl/mobile-tools/.github/actions/pub-release@pub-release-v1 |