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 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
53 changes: 53 additions & 0 deletions .github/workflows/release-manual.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: release-manual
on:
release:
types:
- published
jobs:
dry-run:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Dry run dart package
uses: k-paxian/[email protected]
id: try-dart
with:
accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
relativePath: packages/dart
format: true
dryRunOnly: true
- name: Dry run flutter package
uses: k-paxian/[email protected]
id: try-flutter
with:
accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
flutter: true
relativePath: packages/flutter
format: true
dryRunOnly: true
- name: Check outputs
run: ${{steps.try-dart.outputs.success}} && ${{steps.try-flutter.outputs.success}}
release:
mtrezza marked this conversation as resolved.
Show resolved Hide resolved
runs-on: ubuntu-latest
needs: dry-run
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Publish dart package
uses: k-paxian/[email protected]
with:
accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
relativePath: packages/dart
format: true
- name: Publish flutter package
uses: k-paxian/[email protected]
with:
accessToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_ACCESS_TOKEN }}
refreshToken: ${{ secrets.PUBDEV_GOOGLE_ACCOUNT_REFRESH_TOKEN }}
flutter: true
relativePath: packages/flutter
format: true