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

ci: automate publishing to pub.dev #719

Merged
Merged
Changes from 2 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
36 changes: 36 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
# This workflow publishes the dart and the flutter package to pub.dev, when a new release
# or pre-release is published on GitHub.
#
# Just before publishing, the code is formatted.

name: publish-release
fischerscode marked this conversation as resolved.
Show resolved Hide resolved
on:
release:
types:
- published # Triggering when either a release or a pre-release has been published

jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout the code
fischerscode marked this conversation as resolved.
Show resolved Hide resolved
uses: actions/checkout@v3

- name: Publish the dart package
fischerscode marked this conversation as resolved.
Show resolved Hide resolved
uses: k-paxian/[email protected]
with:
accessToken: ${{ secrets.PUBLISH_OAUTH_ACCESS_TOKEN }}
fischerscode marked this conversation as resolved.
Show resolved Hide resolved
refreshToken: ${{ secrets.PUBLISH_OAUTH_REFRESH_TOKEN }}
relativePath: packages/dart
format: true
dryRunOnly: true # Just temporary for testing

- name: Publish the flutter package
fischerscode marked this conversation as resolved.
Show resolved Hide resolved
uses: k-paxian/[email protected]
with:
accessToken: ${{ secrets.PUBLISH_OAUTH_ACCESS_TOKEN }}
refreshToken: ${{ secrets.PUBLISH_OAUTH_REFRESH_TOKEN }}
flutter: true
relativePath: packages/flutter
format: true
dryRunOnly: true # Just temporary for testing