From f8275ced2d334b747ca843ff06eccab67cacedaf Mon Sep 17 00:00:00 2001 From: Felix Angelov Date: Thu, 25 Jul 2024 13:50:17 -0500 Subject: [PATCH] chore: minor improvements to actions/workflows (#200) * chore: minor improvements to actions/workflows * tweak --- .../publish_flutter_package/action.yaml | 5 +++-- .github/workflows/publish.yaml | 22 ++++++++++--------- 2 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.github/actions/publish_flutter_package/action.yaml b/.github/actions/publish_flutter_package/action.yaml index 0726e24..4d28cbb 100644 --- a/.github/actions/publish_flutter_package/action.yaml +++ b/.github/actions/publish_flutter_package/action.yaml @@ -11,6 +11,7 @@ runs: steps: - name: 📚 Git Checkout uses: actions/checkout@v4 + - name: 🐦 Setup Flutter uses: subosito/flutter-action@v2 @@ -18,7 +19,7 @@ runs: uses: actions/github-script@v6 with: script: | - let pub_token = await core.getIDToken('https://pub.dev') + const pub_token = await core.getIDToken('https://pub.dev') core.exportVariable('PUB_TOKEN', pub_token) - name: 📢 Authenticate @@ -38,4 +39,4 @@ runs: - name: 📢 Publish shell: ${{ inputs.shell }} run: flutter pub publish -f - working-directory: ${{ inputs.working-directory }} \ No newline at end of file + working-directory: ${{ inputs.working-directory }} diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml index ea98874..5b933e6 100644 --- a/.github/workflows/publish.yaml +++ b/.github/workflows/publish.yaml @@ -3,20 +3,22 @@ name: Publish to pub.dev on: push: tags: - - 'shorebird_code_push-v[0-9]+.[0-9]+.[0-9]+*' # for tags like: 'v1.2.3' + - "shorebird_code_push-v[0-9]+.[0-9]+.[0-9]+*" # for tags like: 'v1.2.3' jobs: publish: - environment: 'pub.dev' + environment: pub.dev permissions: id-token: write # Required for authentication using OIDC runs-on: ubuntu-latest steps: - - name: 📚 Git Checkout - uses: actions/checkout@v4 - with: - submodules: recursive - - uses: ./.github/actions/publish_flutter_package - with: - # Specify the github actions deployment environment - working-directory: shorebird_code_push + - name: 📚 Git Checkout + uses: actions/checkout@v4 + with: + submodules: recursive + + - name: 📦 Publish Package + uses: ./.github/actions/publish_flutter_package + with: + # Specify the github actions deployment environment + working-directory: shorebird_code_push