From b03843c343d47ebed483b821a14fd3fba9e8cdd8 Mon Sep 17 00:00:00 2001 From: Maximilian Fischer Date: Fri, 29 Apr 2022 16:24:41 +0200 Subject: [PATCH] Create publish.yml --- .github/workflows/publish.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 000000000..b48b76d3e --- /dev/null +++ b/.github/workflows/publish.yml @@ -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/dart-package-publisher@v1.3 + 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/dart-package-publisher@v1.3 + with: + accessToken: ${{ secrets.PUBLISH_OAUTH_ACCESS_TOKEN }} + refreshToken: ${{ secrets.PUBLISH_OAUTH_REFRESH_TOKEN }} + flutter: true + relativePath: packages/flutter + format: true