From f409edb9d24916aeb751cd75639c1ce99efa4719 Mon Sep 17 00:00:00 2001 From: Paolo Di Lorenzo Date: Mon, 18 Mar 2024 12:15:22 -0400 Subject: [PATCH] Use template rendering action for pr body --- .github/workflows/release-pr-body.md | 7 ++++--- .github/workflows/release.yaml | 11 +++++++++-- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-pr-body.md b/.github/workflows/release-pr-body.md index cc65d5e..504ed09 100644 --- a/.github/workflows/release-pr-body.md +++ b/.github/workflows/release-pr-body.md @@ -1,4 +1,4 @@ -`usmap v${{ inputs.version }}` release candidate +`usmap v{{ .version }}` release candidate #### Pre-release checklist: - [ ] Review automated changes @@ -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` diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index d566413..7baf8cf 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -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