Skip to content

Commit

Permalink
use env-var instead
Browse files Browse the repository at this point in the history
  • Loading branch information
thomassth committed Aug 2, 2024
1 parent daf1103 commit 78876f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 15 deletions.
9 changes: 2 additions & 7 deletions .github/workflows/prerelease.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,9 @@ jobs:
with:
script: |
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
});
core.exportVariable('PUB_TOKEN', pub_token)
- name: 📢 Authenticate
run: flutter pub pub token add https://pub.dev --env-var ${{ secrets.PUB_TOKEN }}
run: flutter pub pub token add https://pub.dev --env-var PUB_TOKEN
- name: 📦 Install dependencies
run: flutter pub get
- name: 🌵 Dry Run
Expand Down
10 changes: 2 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,9 @@ jobs:
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
});
core.exportVariable('PUB_TOKEN', pub_token)
- name: 📢 Authenticate
run: flutter pub pub token add https://pub.dev --env-var ${{ secrets.PUB_TOKEN }}
run: flutter pub pub token add https://pub.dev --env-var PUB_TOKEN
- name: 📦 Install dependencies
run: flutter pub get
- name: 🌵 Dry Run
Expand Down

0 comments on commit 78876f3

Please sign in to comment.