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 diff --git a/PUBLISH.md b/PUBLISH.md new file mode 100644 index 0000000..b52f5be --- /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 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.