Skip to content

Commit

Permalink
chore: update pub publish scripts (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
tomarra authored Oct 22, 2024
1 parent 5a86f78 commit eed6759
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,18 @@ jobs:
run:
working-directory: ./packages/flame_behaviors
permissions:
id-token: write # This is required for requesting the JWT
id-token: write # Required for authentication using OIDC
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 🎯 Setup Dart
uses: dart-lang/setup-dart@v1
- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
- name: 📦 Install Dependencies
run: flutter pub get
- name: 🌵 Dry Run
run: dart pub publish --dry-run
- name: 📢 Publish
run: dart pub publish --force
run: dart pub publish --force
16 changes: 6 additions & 10 deletions .github/workflows/flame_steering_behaviors_pub_publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,22 +11,18 @@ jobs:
run:
working-directory: ./packages/flame_steering_behaviors
permissions:
id-token: write # This is required for requesting the JWT
id-token: write # Required for authentication using OIDC
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 🎯 Setup Dart
uses: dart-lang/setup-dart@v1
- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
- name: 🪪 Get Id Token
uses: actions/github-script@v7
with:
script: |
let pub_token = await core.getIDToken('https://pub.dev')
core.exportVariable('PUB_TOKEN', pub_token)
- name: 📢 Authenticate
run: flutter pub pub token add https://pub.dev --env-var PUB_TOKEN
- name: 📦 Install Dependencies
run: flutter pub get
- name: 🌵 Dry Run
run: dart pub publish --dry-run
- name: 📢 Publish
run: flutter pub publish -f
run: dart pub publish --force

0 comments on commit eed6759

Please sign in to comment.