Skip to content
Draft
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions .github/workflows/release-plz.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Release-plz

on:
push:
branches:
- main

jobs:
release-plz-release:
name: Release-plz release
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'aws' }}
permissions:
contents: write
id-token: write
steps:
- &checkout
name: Checkout repository
uses: actions/checkout@v5
with:
fetch-depth: 0
persist-credentials: true
token: ${{ secrets.RELEASE_PLZ_TOKEN }}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you shouldn't need the token on this step?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Autogenerated by release-plz 🤔

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It seems that once you enable using a personal access token it sets it automatically without even though it's not needed.

- &install-rust
name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Run release-plz
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I highly recommend integrating with trusted publishing as part of this PR, which lets you do:

      - name: Authenticate to crates.io
        uses: rust-lang/crates-io-auth-action@v1
        id: auth
      - name: Run release-plz
        uses: release-plz/[email protected]
        with:
          command: release
        env:
          GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
          CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}

#1035

uses: release-plz/[email protected]
with:
command: release
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}

release-plz-pr:
name: Release-plz PR
runs-on: ubuntu-latest
if: ${{ github.repository_owner == 'aws' }}
permissions:
pull-requests: write
contents: write
concurrency:
group: release-plz-${{ github.ref }}
cancel-in-progress: false
steps:
- *checkout
- *install-rust
- name: Run release-plz
uses: release-plz/[email protected]
with:
command: release-pr
env:
GITHUB_TOKEN: ${{ secrets.RELEASE_PLZ_TOKEN }}
10 changes: 10 additions & 0 deletions release-plz.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
[workspace]
semver_check = true
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is probably redundant since we already have cargo-semver-check CI, but harmless

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Intended to have it explicit 👍🏻

git_release_enable = false

[[package]]
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure if this will work, I think we would need positive statements for our packages if our workspace has it set to false?

Alternative example:

[[package]]
name = "metrique"
changelog_include = [
    "metrique-core",
    "metrique-macro",
    "metrique-metricsrs",
    "metrique-service-metrics",
    "metrique-timesource",
    "metrique-writer",
    "metrique-writer-core",
    "metrique-writer-format-emf",
    "metrique-writer-macro"
]
changelog_path = "./CHANGELOG.md"
git_release_enable = true

But worst case we can always give it a shot and fix if it doesn't work, low stakes.

name = "lambda-integration-tests"
publish = false

[changelog]
protect_breaking_commits = true
Loading