Update publish.yml

This commit is contained in:
droplet
2023-05-29 15:03:33 +08:00
committed by GitHub
parent 5a2035d26a
commit 03af38b480

View File

@ -1,6 +1,7 @@
name: publish
on:
workflow_dispatch:
release:
types: [published]
@ -24,11 +25,5 @@ jobs:
echo $CREDENTIALS > $PUB_CACHE/credentials.json
- run: flutter --version
- run: flutter pub get
- run: flutter format --dry-run --set-exit-if-changed .
- run: dart format --set-exit-if-changed .
- run: echo "y" | flutter pub publish
- name: Run pub.dev/update-credentials@shell
env:
UPDATE_SECRETS_PAT_TOKEN: ${{ secrets.UPDATE_SECRETS_PAT_TOKEN }}
run: |
gh auth login --with-token <<< $UPDATE_SECRETS_PAT_TOKEN
gh secret set CREDENTIALS_JSON < $PUB_CACHE/credentials.json