From ea31c42f374bafae2e19748407c6681bcb5d6886 Mon Sep 17 00:00:00 2001 From: Alexander Sandor Date: Fri, 28 Feb 2025 07:51:46 +0100 Subject: [PATCH 1/3] ci: Add job to deploy to pub.dev --- .github/workflows/publish.yaml | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..d033df1 --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,12 @@ +name: Publish CLI Tools + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+*' # Matches tags like v1.2.3 and v1.2.3-pre.1 + +jobs: + publish: + permissions: + id-token: write + uses: dart-lang/setup-dart/.github/workflows/publish.yml@v1 From a9bc2e936da9f925bd881598a5d16e71b85dc66e Mon Sep 17 00:00:00 2001 From: Alexander Sandor Date: Fri, 28 Feb 2025 10:28:18 +0100 Subject: [PATCH 2/3] docs: Add README for how to publish --- PUBLISH.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 PUBLISH.md diff --git a/PUBLISH.md b/PUBLISH.md new file mode 100644 index 0000000..dd782e9 --- /dev/null +++ b/PUBLISH.md @@ -0,0 +1,13 @@ +# How to publish CLI Tools + +To publish this package, simply create a new tag and push it to the repository. The GitHub action will automatically build and publish the package to pub.dev. + +The tag needs to be in the format `vX.Y.Z`, where `X`, `Y`, and `Z` are integers. The version number should be incremented according to the [Semantic Versioning](https://semver.org/) rules. + +It is also possible to publish a pre-release version by adding a suffix to the version number. For example, `v1.0.0-dev.1` is a pre-release version of `v1.0.0`. + +## Create a new tag + +The preferred way to create a new tag is to use GitHubs interface to create a new release. + +The automatically generated changelogs for the github release do not need to be modified. Instead the `CHANGELOG.md` is our source of truth on pub.dev. From b921f30ec4b214810f35d4beda5c7fd020733abf Mon Sep 17 00:00:00 2001 From: Alexander Sandor Date: Fri, 28 Feb 2025 10:53:00 +0100 Subject: [PATCH 3/3] docs(review): Fix code rabbit suggestions. --- PUBLISH.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/PUBLISH.md b/PUBLISH.md index dd782e9..b52f5be 100644 --- a/PUBLISH.md +++ b/PUBLISH.md @@ -8,6 +8,6 @@ It is also possible to publish a pre-release version by adding a suffix to the v ## Create a new tag -The preferred way to create a new tag is to use GitHubs interface to create a new release. +The preferred way to create a new tag is to use GitHub's interface to create a new release. -The automatically generated changelogs for the github release do not need to be modified. Instead the `CHANGELOG.md` is our source of truth on pub.dev. +The automatically generated changelogs for the github release do not need to be modified. Instead, the `CHANGELOG.md` is our source of truth on pub.dev.