From 933da818044281ff69b5ccd990979a4a5e692519 Mon Sep 17 00:00:00 2001 From: Pal Dorogi Date: Wed, 22 May 2024 19:04:34 +0200 Subject: [PATCH] ci: added publish.yml. --- .github/workflows/publish.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 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 0000000..36a1d1d --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,23 @@ +# .github/workflows/publish.yml +name: Publish to pub.dev + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+*' # tag pattern on pub.dev: 'v{{version}' + +# Publish using custom workflow +jobs: + publish: + permissions: + id-token: write # Required for authentication using OIDC + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: dart-lang/setup-dart@v1 + - name: Install dependencies + run: dart pub get + - name: Publish - dry run + run: dart pub publish --dry-run + - name: Publish to pub.dev + run: dart pub publish -f \ No newline at end of file