Update publish.yml

pull/1507/head
X Code 1 year ago committed by GitHub
parent 0967c8cabf
commit e2cfa1d453
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 32
      .github/workflows/publish.yml

@ -3,29 +3,19 @@ name: Publish to pub.dev
on: on:
push: push:
tags: tags:
- 'v[0-9]+.[0-9]+.[0-9]+*' # Trigger this action when a version tag is pushed - 'v[0-9]+.[0-9]+.[0-9]+*' # tag pattern on pub.dev: 'v'
jobs: jobs:
publish: publish:
runs-on: ubuntu-latest
permissions: permissions:
contents: read id-token: write # Required for authentication using OIDC
id-token: write runs-on: ubuntu-latest
packages: write
steps: steps:
- uses: actions/checkout@v2 - uses: actions/checkout@v3
- uses: dart-lang/setup-dart@v1
- name: Setup Flutter environment - name: Install dependencies
uses: subosito/flutter-action@v1 run: dart pub get
with: # Here you can insert custom steps you need
flutter-version: '3.13.9' # - run: dart tool/generate-code.dart
- name: Publish
- name: Disable Flutter telemetry run: dart pub publish --force
run: flutter --disable-telemetry
- name: Publish to pub.dev
env:
PUB_ACCESS_TOKEN: ${{ secrets.PUB_ACCESS_TOKEN }}
run: |
echo 'PUB_ACCESS_TOKEN=$PUB_ACCESS_TOKEN' > $HOME/.pub-cache/credentials.json
flutter pub publish --force

Loading…
Cancel
Save