From c6735b4b08ad2676dc6761bef674d2287024e199 Mon Sep 17 00:00:00 2001 From: Alex <51419598+alexrintt@users.noreply.github.com> Date: Fri, 16 Feb 2024 04:11:27 -0300 Subject: [PATCH] Update publish.yaml --- .github/workflows/publish.yaml | 33 +++++++++++++++++++++++++-------- 1 file changed, 25 insertions(+), 8 deletions(-) diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index 6d79fe4..0a98f91 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -1,14 +1,31 @@ -name: Publish to pub.dev - +name: Publish new plugin version to pub.dev +run-name: >- + [shared_storage] package publish (${{ github.ref_name }}) triggered by @${{ github.actor }} on: push: tags: - - 'v[0-9]+.[0-9]+.[0-9]+*' - + - "v[0-9]+.[0-9]+.[0-9]+" jobs: publish: + runs-on: ubuntu-latest permissions: - id-token: write # Required for authentication using OIDC - uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 - # with: - # working-directory: path/to/package/within/repository + id-token: write # This is required for requesting the JWT + defaults: + run: + working-directory: ./ + steps: + # Checkout repository + - uses: actions/checkout@v4 + - uses: subosito/flutter-action@v2 + with: + channel: 'stable' # or: 'beta', 'dev', 'master' (or 'main') + - run: flutter --version + + - name: Install dependencies + run: flutter pub get + + - name: Run Dart analyzer + run: flutter analyze --fatal-infos + + - name: Publish to pub dev + run: dart pub publish --force