Skip to content

Commit

Permalink
(semi-) Automate the release process (#46)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmagician authored Feb 16, 2023
1 parent 6d500af commit 9bac46f
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .github/release-pr-template.ejs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
This is a release PR for version **<%= version.actual %>**<%
if (version.actual != version.desired) {
%> (performing a <%= version.desired %> bump).<%
} else {
%>.<%
}
%>

You will still need to manually publish the cargo crate:

```
$ make VERSION=<%= version.actual %> release
```
34 changes: 34 additions & 0 deletions .github/workflows/release_pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Open a release PR
on:
workflow_dispatch:
inputs:
version:
description: Version to release
required: true
type: choice
options:
- alpha
- patch
- minor
base_branch:
description: Branch to target
required: true
type: string
default: 'releases'

jobs:
make-release-pr:
runs-on: ubuntu-latest
steps:
- name: Install cargo-release
uses: taiki-e/install-action@v1
with:
tool: cargo-release

- uses: actions/checkout@v3
- uses: cargo-bins/release-pr@v2
with:
pr-template-file: .github/release-pr-template.ejs
github-token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ inputs.version }}
base-branch: ${{ inputs.base_branch }}

0 comments on commit 9bac46f

Please sign in to comment.