From a6c6a05cf4625e73edb4e7d7a81dbdf32f838611 Mon Sep 17 00:00:00 2001 From: Casey Hillers Date: Tue, 28 Nov 2023 11:48:39 -0800 Subject: [PATCH] Add publish pubdev and some minor cleanup --- .github/workflows/create_release.yml | 2 +- .../workflows/{tag_release.yml => create_tag.yml} | 0 .github/workflows/publish_pubdev.yml | 14 ++++++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) rename .github/workflows/{tag_release.yml => create_tag.yml} (100%) create mode 100644 .github/workflows/publish_pubdev.yml diff --git a/.github/workflows/create_release.yml b/.github/workflows/create_release.yml index bd0b4eec..8255c0c0 100644 --- a/.github/workflows/create_release.yml +++ b/.github/workflows/create_release.yml @@ -11,6 +11,6 @@ jobs: - name: Create a Release uses: elgohr/Github-Release-Action@v5 env: - GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" + GITHUB_TOKEN: "${{ secrets.RELEASE_TOKEN }}" with: title: ${{ github.ref }} diff --git a/.github/workflows/tag_release.yml b/.github/workflows/create_tag.yml similarity index 100% rename from .github/workflows/tag_release.yml rename to .github/workflows/create_tag.yml diff --git a/.github/workflows/publish_pubdev.yml b/.github/workflows/publish_pubdev.yml new file mode 100644 index 00000000..336e0cf5 --- /dev/null +++ b/.github/workflows/publish_pubdev.yml @@ -0,0 +1,14 @@ +# .github/workflows/publish.yml +name: Publish to pub.dev + +on: + push: + tags: + - '[0-9]+.[0-9]+.[0-9]+*' + +# Publish using the reusable workflow from dart-lang. +jobs: + publish: + permissions: + id-token: write # Required for authentication using OIDC + uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 \ No newline at end of file