Skip to content

Commit a9c01f8

Browse files
committed
Set release workflow to re-use usmapdata release.yaml
1 parent 32571aa commit a9c01f8

File tree

1 file changed

+4
-75
lines changed

1 file changed

+4
-75
lines changed

.github/workflows/release.yaml

Lines changed: 4 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -12,78 +12,7 @@ on:
1212

1313
jobs:
1414
release:
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- name: Checkout
19-
uses: actions/checkout@v4
20-
21-
- name: Check version number
22-
env:
23-
INPUT_VERSION: ${{ inputs.version }}
24-
run: .github/workflow-resources/release-version-check.sh
25-
26-
- name: Setup R
27-
uses: r-lib/actions/setup-r@v2
28-
29-
- name: Install R dependencies
30-
uses: r-lib/actions/setup-r-dependencies@v2
31-
with:
32-
extra-packages: |
33-
any::devtools
34-
any::rhub
35-
github::r-lib/revdepcheck
36-
37-
- name: Run release checks
38-
env:
39-
EMAIL: ${{ secrets.RHUB_EMAIL }}
40-
TOKEN: ${{ secrets.RHUB_TOKEN }}
41-
VERSION: ${{ inputs.version }}
42-
run: |
43-
source(".github/workflow-resources/release-checklist.R")
44-
release_checklist(
45-
Sys.getenv("EMAIL"),
46-
Sys.getenv("TOKEN"),
47-
Sys.getenv("VERSION")
48-
)
49-
shell: Rscript {0}
50-
51-
- name: Update NEWS.md version
52-
uses: jacobtomlinson/gha-find-replace@v3
53-
with:
54-
find: "[unreleased]"
55-
replace: "${{ github.event.repository.name }} ${{ inputs.version }}"
56-
include: "NEWS.md"
57-
regex: false
58-
59-
- name: Import GPG signing key
60-
uses: crazy-max/ghaction-import-gpg@v6
61-
with:
62-
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
63-
passphrase: ${{ secrets.GPG_PASSPHRASE }}
64-
git_user_signingkey: true
65-
git_commit_gpgsign: true
66-
67-
- name: Render PR body
68-
id: pr-body
69-
uses: chuhlomin/render-template@v1
70-
with:
71-
template: .github/workflow-resources/release-pr-body.md
72-
vars: |
73-
version: ${{ inputs.version }}
74-
75-
- name: Open pull request
76-
uses: peter-evans/create-pull-request@v6
77-
with:
78-
token: ${{ secrets.BOT_PAT }}
79-
author: ${{ secrets.BOT_USER }}
80-
committer: ${{ secrets.BOT_USER }}
81-
commit-message: "[automated] Prepare for ${{ inputs.version }} release"
82-
branch: release/${{ inputs.version }}
83-
title: Release version ${{ inputs.version }}
84-
body: ${{ steps.pr-body.outputs.result }}
85-
reviewers: pdil
86-
assignees: pdil
87-
labels: release
88-
delete-branch: true
89-
draft: true
15+
uses: pdil/usmapdata/.github/workflows/release.yaml@master
16+
secrets: inherit
17+
with:
18+
version: ${{ inputs.version }}

0 commit comments

Comments
 (0)