Skip to content

Commit

Permalink
Merge pull request #96 from bitmovin/feature/fix-publish-workflow
Browse files Browse the repository at this point in the history
Fix workflow for publishing to pub.dev
  • Loading branch information
hawk23 authored Jan 8, 2024
2 parents 84003a7 + ee020fb commit 88ef3fb
Showing 1 changed file with 19 additions and 4 deletions.
23 changes: 19 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,28 @@ on:
- '[0-9]+.[0-9]+.[0-9]+*'

jobs:
# This job is based on dart-lang/setup-dart/.github/workflows/publish.yml@v1, which cannot be used here as it only
# supports publishing pure Dart packages and not Flutter packages.
publish:
name: Publish to pub.dev
environment: pub.dev
permissions:
id-token: write
uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1
with:
environment: pub.dev
id-token: write # This is required for requesting the JWT
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: ./.github/actions/prepare-dependencies

# Setup Dart SDK with JWT token. This is needed to allow publishing to pub.dev from the CI without having to
# manually log-in in to pub.dev with an admin account.
- uses: dart-lang/[email protected]

- name: Publish dry run
run: dart pub publish --dry-run

- name: Publish to pub.dev
run: dart pub publish -f

create_gh_release:
name: Create GitHub release
Expand Down

0 comments on commit 88ef3fb

Please sign in to comment.