Skip to content

Commit

Permalink
Use template rendering action for pr body
Browse files Browse the repository at this point in the history
  • Loading branch information
pdil committed Mar 18, 2024
1 parent 473b939 commit f409edb
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 5 deletions.
7 changes: 4 additions & 3 deletions .github/workflows/release-pr-body.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
`usmap v${{ inputs.version }}` release candidate
`usmap v{{ .version }}` release candidate

#### Pre-release checklist:
- [ ] Review automated changes
Expand All @@ -10,12 +10,13 @@
- [ ] Update `NEWS` if necessary
- [ ] Run `devtools::release()` from this branch
- [ ] Perform necessary CRAN verification release steps (see maintainer email)

Wait for CRAN to publish package. If issues are reported, make changes in this PR and re-run `devtools::release()`.

#### Post-release checklist:
- [ ] `git tag v{{ $inputs.version }}`
- [ ] `git tag v{{ .version }}`
- [ ] `git push --tags`
- [ ] Update `DESCRIPTION` and `NEWS.md` versions to `{{ $inputs.version }}.9000`
- [ ] Update `DESCRIPTION` and `NEWS.md` versions to `{{ .version }}.9000`
- [ ] Add release date of latest version to `NEWS.md`
- Example `Released Monday, February 31, 2020.`
- [ ] Commit changes with message `Prepare for next release`
Expand Down
11 changes: 9 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,21 @@ jobs:
include: "NEWS.md"
regex: false

- name: Render PR body
id: pr-body
uses: chuhlomin/render-template@v1
with:
template: .github/workflows/release-pr-body.md
vars: |
version: ${{ inputs.version }}
- name: Open pull request
id: open-pr
uses: peter-evans/create-pull-request@v5
with:
commit-message: "[automated] Prepare for ${{ inputs.version }} release"
branch: release/${{ inputs.version }}
title: Release version ${{ inputs.version }}
body-path: .github/workflows/release-pr-body.md
body: ${{ steps.pr-body.outputs.result }}
reviewers: pdil
assignees: pdil
labels: release
Expand Down

0 comments on commit f409edb

Please sign in to comment.