-
Notifications
You must be signed in to change notification settings - Fork 19
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
crow
committed
Nov 9, 2024
1 parent
02e092f
commit f71beb5
Showing
1 changed file
with
5 additions
and
18 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 |
---|---|---|
|
@@ -30,6 +30,8 @@ jobs: | |
release-plugin: | ||
runs-on: ubuntu-latest | ||
needs: [ ci ] | ||
permissions: | ||
id-token: write # Required for authentication using OIDC | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
@@ -60,24 +62,9 @@ jobs: | |
flutter-version: ${{ env.FLUTTER_VERSION }} | ||
- run: flutter pub get | ||
|
||
- name: Setup pub credentials | ||
run: | | ||
mkdir -p ~/.pub-cache | ||
cat <<EOF > ~/.pub-cache/credentials.json | ||
{ | ||
"accessToken":"${{ secrets.OAUTH_ACCESS_TOKEN }}", | ||
"refreshToken":"${{ secrets.OAUTH_REFRESH_TOKEN }}", | ||
"tokenEndpoint":"https://accounts.google.com/o/oauth2/token", | ||
"scopes": [ "openid", "https://www.googleapis.com/auth/userinfo.email" ], | ||
"expiration": ${{secrets.OAUTH_EXPIRATION }} | ||
} | ||
EOF | ||
mkdir -p ~/Library/Application\ Support/dart/ | ||
cp ~/.pub-cache/credentials.json ~/Library/Application\ Support/dart/pub-credentials.json | ||
cp ~/.pub-cache/credentials.json $PUB_CACHE/credentials.json || true | ||
- uses: dart-lang/setup-dart@v1 | ||
- name: Publish Dart/Flutter package | ||
run: flutter pub publish -f | ||
run: flutter pub publish --force | ||
|
||
- name: Github Release | ||
uses: actions/[email protected] | ||
|
@@ -143,4 +130,4 @@ jobs: | |
with: | ||
type: ${{ job.status }} | ||
job_name: ":raised_hands: Airship Flutter Plugin Released! :raised_hands:" | ||
url: ${{ secrets.MOBILE_SLACK_WEBHOOK }} | ||
url: ${{ secrets.MOBILE_SLACK_WEBHOOK }} |