-
Notifications
You must be signed in to change notification settings - Fork 276
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
2 changed files
with
46 additions
and
29 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
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 |
---|---|---|
|
@@ -19,21 +19,31 @@ jobs: | |
# Steps represent a sequence of tasks that will be executed as part of the job | ||
steps: | ||
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | ||
- uses: actions/checkout@v2 | ||
- uses: subosito/flutter-action@v1 | ||
with: | ||
channel: "stable" | ||
- uses: actions/checkout@v4 | ||
# copied from https://github.com/dart-lang/setup-dart/issues/68#issuecomment-2251116730 | ||
- uses: subosito/flutter-action@v2 | ||
- run: dart --version | ||
- run: flutter --version | ||
publish: | ||
needs: release | ||
permissions: | ||
id-token: write # Required for authentication using OIDC | ||
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 | ||
entry: | ||
needs: [release, publish] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 🪪 Get Id Token | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
let pub_token = await core.getIDToken('https://pub.dev') | ||
let pub_token = await core.getIDToken('https://pub.dev') | ||
github.rest.actions.createOrUpdateRepoSecret({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
secret_name: PUB_TOKEN, | ||
encrypted_value: pub_token | ||
}); | ||
- name: 📢 Authenticate | ||
run: flutter pub pub token add https://pub.dev --env-var ${{ secrets.PUB_TOKEN }} | ||
- name: 📦 Install dependencies | ||
run: flutter pub get | ||
- name: 🌵 Dry Run | ||
run: flutter pub publish --dry-run | ||
- name: 📢 Publish | ||
run: flutter pub publish -f | ||
- name: Get Changelog Entry | ||
id: changelog_reader | ||
uses: mindsers/[email protected] | ||
|