From 132b737ce6e53014d06561a53ff1ed95c3f565ff Mon Sep 17 00:00:00 2001 From: Bartek Pacia Date: Mon, 23 May 2022 15:43:56 +0200 Subject: [PATCH] add GitHub Action which will automatically create a new release on new version tag --- .github/workflows/publish.yaml | 30 ++++++++++++++++++++++++++++++ .github/workflows/test.yaml | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 00000000..1b880d3f --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,30 @@ +name: publish + +on: + push: + tags: ["v*"] + +jobs: + publish: + name: Publish to pub.dev + + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v2 + + - name: Setup Dart + uses: dart-lang/setup-dart@v1 + with: + sdk: 2.17.0 + + - name: Download pub.dev credentials + env: + CREDENTIALS: ${{ secrets.PUB_DEV_CREDENTIALS }} + run: | + mkdir -p ~/.pub-cache + echo $CREDENTIALS > ~/.pub-cache/credentials.json + + - name: Publish + run: dart pub publish -f diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 127481a6..92df3f07 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -1,4 +1,4 @@ -name: flutter_downloader test +name: test on: push: