Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(ci): Incorrect publish workflow for Flutter #66

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ env:
FLUTTER_VERSION: '3.x'

jobs:
# TODO https://github.com/Flagsmith/flagsmith-flutter-client/issues/57
analyze:
runs-on: ubuntu-latest
name: Dart Analyze
Expand All @@ -20,9 +21,24 @@ jobs:
- run: flutter pub get
- run: flutter analyze

# TODO https://github.com/Flagsmith/flagsmith-flutter-client/issues/57

publish:
permissions:
id-token: write
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Flutter
uses: subosito/flutter-action@v2

- name: Get pub.dev token
uses: actions/github-script@v6
with:
script: |
let pub_token = await core.getIDToken('https://pub.dev')
core.exportVariable('PUB_TOKEN', pub_token)

- name: Publish
run: |
flutter pub pub token add https://pub.dev --env-var PUB_TOKEN
flutter pub publish
2 changes: 1 addition & 1 deletion .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:

# TODO https://github.com/Flagsmith/flagsmith-flutter-client/issues/57

publishing:
publish-dry-run:
runs-on: ubuntu-latest
name: Dart Publish Package Test
needs: tests
Expand Down
Loading