From eb97a0ca34d5ddf4ca55df28a17409231377e55d Mon Sep 17 00:00:00 2001 From: Pantelis Tsakoulis Date: Tue, 23 May 2023 01:07:37 +0300 Subject: [PATCH] Add release workflow --- .github/workflows/release.yaml | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..acffa2c --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,29 @@ +name: Publish Workflow + +on: + release: + types: [published] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + build: + runs-on: "ubuntu-latest" + steps: + - uses: actions/checkout@v3 + - uses: subosito/flutter-action@v2 + with: + flutter-version: "3.10.1" + channel: "stable" + - run: flutter pub get + - run: dart format --output none --set-exit-if-changed -l 80 lib + - run: dart analyze --fatal-infos --fatal-warnings lib + - run: flutter test + - name: Release + run: | + dart pub publish --dry-run + mkdir -p ~/.config/dart + echo "${{ secrets.PUBDEV_TOKEN }}" | base64 --decode >> ~/.config/dart/pub-credentials.json + dart pub publish --force