-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
14 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,24 @@ | ||
name: Publish to pub.dev | ||
run-name: Publish action triggered by @${{ github.actor }} | ||
|
||
on: | ||
release: | ||
types: [published] | ||
# "workflow_dispatch" for manual trigger | ||
push: | ||
tags: | ||
- "publish_[0-9]+.[0-9]+.[0-9]+*" | ||
|
||
workflow_dispatch: | ||
|
||
# Publish using custom workflow | ||
jobs: | ||
publish: | ||
permissions: | ||
id-token: write # Required for authentication using OIDC | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@main | ||
- name: Publish to Pub.dev | ||
uses: k-paxian/dart-package-publisher@master | ||
with: | ||
accessToken: ${{ secrets.OAUTH_ACCESS_TOKEN }} | ||
refreshToken: ${{ secrets.OAUTH_REFRESH_TOKEN }} | ||
credentialJson: ${{ secrets.CREDENTIAL_JSON }} | ||
flutter: true | ||
skipTests: true | ||
- uses: actions/checkout@v3 | ||
- uses: dart-lang/setup-dart@v1 | ||
- name: Install dependencies | ||
run: dart pub get | ||
# Here you can insert custom steps you need | ||
# - run: dart tool/generate-code.dart | ||
- name: Publish | ||
run: dart pub publish --force |