From 83f7676d3c8d5effcbdeaa1d06d045c8698fb7d1 Mon Sep 17 00:00:00 2001 From: louisdachet Date: Mon, 13 May 2024 16:01:21 +0200 Subject: [PATCH] ci: use a custom script to publish packages --- .github/workflows/publish-to-pub-on-tag.yaml | 28 ++++++++++++++++++-- 1 file changed, 26 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-to-pub-on-tag.yaml b/.github/workflows/publish-to-pub-on-tag.yaml index e2adad6..4c88c9f 100644 --- a/.github/workflows/publish-to-pub-on-tag.yaml +++ b/.github/workflows/publish-to-pub-on-tag.yaml @@ -6,6 +6,30 @@ on: jobs: publish: + runs-on: ubuntu-latest + + # Required for publishing to pub.dev permissions: - id-token: write # Required for authentication using OIDC - uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 + id-token: write + + steps: + - uses: actions/checkout@v2 + + - id: dotenv + uses: falti/dotenv-action@v0.2.8 + with: + path: .github/workflows/.env + + - uses: subosito/flutter-action@v2.5.0 + with: + flutter-version: ${{ steps.dotenv.outputs.flutter_version }} + channel: "stable" + cache: true + cache-key: flutter-macos-${{ steps.dotenv.outputs.flutter_version }} + cache-path: ${{ runner.tool_cache }}/flutter-${{ steps.dotenv.outputs.flutter_version }} + + - name: Install Dependencies + run: flutter pub get + + - name: Publish to pub.dev + run: flutter pub publish --force