Skip to content

Commit

Permalink
fix: attempt to fix publish GHA (#199)
Browse files Browse the repository at this point in the history
  • Loading branch information
eseidel authored Jul 25, 2024
1 parent af228be commit 9651576
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 5 deletions.
27 changes: 27 additions & 0 deletions .github/actions/publish_flutter_package/action.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish Flutter package to pub.dev
description: Publish your Flutter package to pub.dev

inputs:
working-directory:
description: directory with-in the repository where the package is located (if not in the repository root)
required: false

runs:
using: "composite"
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
- name: 📦 Install dependencies
shell: ${{ inputs.shell }}
run: flutter pub get
working-directory: ${{ inputs.working-directory }}
- name: 🌵 Dry Run
shell: ${{ inputs.shell }}
run: flutter pub publish --dry-run
working-directory: ${{ inputs.working-directory }}
- name: 📢 Publish
shell: ${{ inputs.shell }}
run: flutter pub publish -f
working-directory: ${{ inputs.working-directory }}
11 changes: 6 additions & 5 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,9 @@ jobs:
publish:
permissions:
id-token: write # Required for authentication using OIDC
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
with:
# Specify the github actions deployment environment
environment: pub.dev
working-directory: shorebird_code_push
runs-on: ubuntu-latest
steps:
- uses: ./.github/actions/publish_flutter_package
with:
# Specify the github actions deployment environment
working-directory: shorebird_code_push

0 comments on commit 9651576

Please sign in to comment.