Skip to content

ci: automated release setup#1628

Merged
ghaith merged 4 commits intomasterfrom
releases
Mar 26, 2026
Merged

ci: automated release setup#1628
ghaith merged 4 commits intomasterfrom
releases

Conversation

@ghaith
Copy link
Copy Markdown
Collaborator

@ghaith ghaith commented Mar 9, 2026

This pull request introduces a new automated release workflow and updates several GitHub Actions used in CI pipelines to more recent versions. The main improvements include adding workflows for automated release PR creation and publishing, and updating action versions for better reliability and support.

Release automation:

  • Added .github/workflows/release-pr.yml to automate the creation and updating of release pull requests, including version bumping and changelog generation.
  • Added .github/workflows/release.yml to automatically tag and create GitHub releases when a release PR is merged.
  • Added cliff.toml configuration for git-cliff to standardize changelog generation based on conventional commits.

CI/CD maintenance:

  • Updated all usages of actions/checkout from v3 to v4 across workflow files for improved performance and support. [1] [2] [3] [4] [5]
  • Updated peaceiris/actions-gh-pages and actions/upload-artifact to their latest major versions (v4) for deployment and artifact upload steps. [1] [2]

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR sets up automated release management for the repository using release-plz. It introduces a GitHub Actions workflow that triggers on pushes to master and optionally uses a GitHub App token for creating/updating release PRs. A release-plz.toml configuration file is added to define which packages are released, their version grouping, and tag naming conventions.

Changes:

  • Added .github/workflows/release-plz.yml to automate release PR creation via the release-plz action.
  • Added release-plz.toml to configure workspace-level and per-package release settings for rusty, plc_driver, and iec61131std.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
.github/workflows/release-plz.yml Workflow triggered on master pushes to generate release PRs via release-plz/action@v0.3, with optional GitHub App token support
release-plz.toml Configures release-plz with workspace defaults and per-package release settings for three packages in a shared version group

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release-plz.yml Outdated
Comment thread release-plz.toml Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release-plz.yml Outdated
Comment thread .github/workflows/release-plz.yml Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/release-plz.yml Outdated
volsa
volsa previously approved these changes Mar 18, 2026
on master commits, a new pr is created(or updated) to prepare te next
release.
when pushed, this pr is auto-tagged
@ghaith
Copy link
Copy Markdown
Collaborator Author

ghaith commented Mar 25, 2026

release-plz kept failing on dry-runs or not bumpin versions because it seems to always look for a crates.io package which we don't have. I switched to git-cliff with a manual set version instead.
This is still fully vibed, so yolo

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 7 out of 8 changed files in this pull request and generated 7 comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cliff.toml
Comment on lines +7 to +10
{%- macro remote_url() -%}
https://github.com/PLC-lang/rusty
{%- endmacro -%}

Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

remote_url() is hardcoded to https://github.com/PLC-lang/rusty, but the workspace Cargo.toml currently declares the repository as https://github.com/ghaith/rusty/. If cliff.toml is intended to generate correct release/tag/PR links, these should be aligned (either update remote_url() or update the crate metadata).

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/release-pr.yml Outdated
Comment on lines +38 to +39
cargo install cargo-edit --locked
cargo install git-cliff --locked
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

cargo install cargo-edit / cargo install git-cliff without an explicit --version makes the release process non-reproducible (the tool versions can change over time, potentially changing bump logic/changelog output). Consider pinning tool versions (or using a setup action that pins versions) so release behavior stays stable.

Suggested change
cargo install cargo-edit --locked
cargo install git-cliff --locked
cargo install cargo-edit --locked --version 0.12.3
cargo install git-cliff --locked --version 2.4.0

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/release.yml Outdated
token: ${{ steps.app-token.outputs.token }}

- name: Install git-cliff
uses: kenji-miyake/setup-git-cliff@v2
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

kenji-miyake/setup-git-cliff@v2 is used without specifying the git-cliff version, which can make release-note generation change over time if the action defaults to “latest”. Consider pinning the git-cliff version explicitly (via the action input) to keep bump/release-note behavior reproducible.

Suggested change
uses: kenji-miyake/setup-git-cliff@v2
uses: kenji-miyake/setup-git-cliff@v2
with:
version: "2.3.0"

Copilot uses AI. Check for mistakes.
Comment on lines +1 to +5
---
name: Release PR

on:
push:
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

The PR description mentions release-plz (release-plz.toml + a release-plz workflow), but this PR actually introduces custom git-cliff/cargo-edit + create-pull-request automation instead. Please update the PR description to match what’s being shipped (or add the missing release-plz files if that was the original intent).

Copilot uses AI. Check for mistakes.
Comment on lines +20 to +32
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}

Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

actions/create-github-app-token is called unconditionally, so this workflow will fail in any environment where APP_ID / APP_PRIVATE_KEY secrets are not configured (despite the PR description implying the App token is optional). Consider making App-token generation conditional and falling back to the default GITHUB_TOKEN when the secrets are absent; then use that selected token for checkout + PR creation.

Copilot uses AI. Check for mistakes.
Comment thread .github/workflows/release-pr.yml Outdated
Comment on lines +17 to +18
# Skip if the push is a release PR merge
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

The job-level condition uses github.event.head_commit.message, but this workflow also supports workflow_dispatch where head_commit isn’t present. Please guard the condition by event type (or default the message to an empty string) so manual runs don’t error/behave unexpectedly.

Suggested change
# Skip if the push is a release PR merge
if: "!startsWith(github.event.head_commit.message, 'chore(release):')"
# Skip if the push is a release PR merge; always run for non-push events
if: ${{ github.event_name != 'push' || !startsWith(github.event.head_commit.message || '', 'chore(release):') }}

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +34
- name: Generate GitHub App token
id: app-token
uses: actions/create-github-app-token@v2
with:
app-id: ${{ secrets.APP_ID }}
private-key: ${{ secrets.APP_PRIVATE_KEY }}

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}

Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

actions/create-github-app-token is required unconditionally here as well, meaning tagging/release creation will fail unless APP_ID / APP_PRIVATE_KEY secrets are configured. If the GitHub App token is meant to be optional, make token generation conditional and fall back to the workflow GITHUB_TOKEN for checkout and action-gh-release when secrets aren’t available.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 1 comment.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread cliff.toml
[changelog]
header = """# Changelog

All notable changes to this project will be documented in this file.\n
Copy link

Copilot AI Mar 25, 2026

Choose a reason for hiding this comment

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

In TOML multiline strings, newlines are already preserved; the explicit \n at the end of the header text will render as an extra newline (effectively adding an extra blank line) in the generated changelog. Consider removing the escape and relying on the literal newline(s) in the multiline string to control spacing.

Suggested change
All notable changes to this project will be documented in this file.\n
All notable changes to this project will be documented in this file.

Copilot uses AI. Check for mistakes.
Copy link
Copy Markdown
Member

@volsa volsa left a comment

Choose a reason for hiding this comment

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

yolo right?

@ghaith ghaith merged commit c1cff95 into master Mar 26, 2026
37 checks passed
@ghaith ghaith deleted the releases branch March 26, 2026 07:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants