diff --git a/.github/workflows/release-plz.yml b/.github/workflows/release-plz.yml new file mode 100644 index 0000000..3fab03e --- /dev/null +++ b/.github/workflows/release-plz.yml @@ -0,0 +1,52 @@ +name: Release-plz + +permissions: + pull-requests: write + contents: write + +on: + push: + tags: + - "*" + +jobs: + # Release unpublished packages. + release-plz-release: + name: Release-plz release + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Run release-plz + uses: MarcoIeni/release-plz-action@v0.5 + with: + command: release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + + # Create a PR with the new versions and changelog, preparing the next release. + release-plz-pr: + name: Release-plz PR + runs-on: ubuntu-latest + concurrency: + group: release-plz-${{ github.ref }} + cancel-in-progress: false + steps: + - name: Checkout repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Install Rust toolchain + uses: dtolnay/rust-toolchain@stable + - name: Run release-plz + uses: MarcoIeni/release-plz-action@v0.5 + with: + command: release-pr + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} diff --git a/release-plz.toml b/release-plz.toml new file mode 100644 index 0000000..eba2eab --- /dev/null +++ b/release-plz.toml @@ -0,0 +1,36 @@ +[workspace] +allow_dirty = false +dependencies_update = false # update dependencies with `cargo update` +git_release_enable = true # enable GitHub releases +pr_branch_prefix = "release-plz-" # PR branch prefix +pr_name = "Release {{ package }} v{{ version }}" # template for the PR name +pr_labels = ["release"] # add the `release` label to the release Pull Request +publish_allow_dirty = false # don't add `--allow-dirty` to `cargo publish` +semver_check = true # enable API breaking changes checks +publish_timeout = "10m" # set a timeout for `cargo publish` + +[[package]] +name = "ferrunix" +changelog_include = ["ferrunix-core", "ferrunix-macros"] # include commits from others in the changelog +changelog_update = true # enable changelog update +git_release_enable = true # enable GitHub releases +publish = true # enable `cargo publish` + +[[package]] +name = "ferrunix-core" +changelog_update = true # enable changelog update +git_release_enable = false # disable GitHub releases +publish = true # enable `cargo publish` + +[[package]] +name = "ferrunix-macros" +changelog_update = true # enable changelog update +git_release_enable = false # disable GitHub releases +publish = true # enable `cargo publish` + +[[package]] +name = "xtask" +release = false # don't process this package + +[changelog] +protect_breaking_commits = true # always include commits with breaking changes in the changelog