Skip to content

Commit

Permalink
Create publish.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
fischerscode committed Apr 30, 2022
1 parent 68ab6af commit b03843c
Showing 1 changed file with 34 additions and 0 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
# 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
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
uses: actions/checkout@v3

- name: Publish the dart package
uses: k-paxian/[email protected]
with:
accessToken: ${{ secrets.PUBLISH_OAUTH_ACCESS_TOKEN }}
refreshToken: ${{ secrets.PUBLISH_OAUTH_REFRESH_TOKEN }}
relativePath: packages/dart
format: true

- name: Publish the flutter package
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

0 comments on commit b03843c

Please sign in to comment.