-
-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
### Changes * Added automated release workflow to step through most of https://github.com/pdil/usmap/wiki/🚀-Release-Process * Once active, this will allow most of the manual release work to be performed and added to an automated pull request. * The pull request will allow maintainers to review changes and release the package without having to do all of the required steps. * The pull request will include pre and post release checklists to ensure all steps are performed. * Added spelling check ### Notes * The changes in this pull request are non-destructive and do not actually submit the package to CRAN so it can be tested freely. * This pull request must be merged before it can be tested since it uses a `workflow_dispatch` workflow. * After merging, a new pull request will be opened with any ongoing fixes required to make it fully functional.
- Loading branch information
Showing
10 changed files
with
133 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
release_checklist <- function(version) { | ||
# Platform checks | ||
devtools::check_rhub(interactive = FALSE) | ||
devtools::check_win_devel() | ||
|
||
# Reverse dependency checks | ||
revdepcheck::revdep_reset() | ||
revdepcheck::revdep_check() | ||
|
||
# Version number updates | ||
desc::desc_set_version(version) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
`usmap v${{ inputs.version }}` release candidate | ||
|
||
#### Pre-release checklist: | ||
- [ ] Review automated changes | ||
- [ ] Review rhub and win_devel checks (see maintainer email for results) | ||
- [ ] Review reverse dependency checks | ||
- [ ] Review check and test results | ||
- [ ] Verify `DESCRIPTION` and `NEWS.md` are accurate | ||
- [ ] Update `cran-comments.md` if necessary | ||
- [ ] 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 push --tags` | ||
- [ ] Update `DESCRIPTION` and `NEWS.md` versions to `{{ $inputs.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` | ||
- [ ] `usethis::use_github_release()` | ||
- Merge this PR |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
|
||
name: release | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: "The version number for new release, e.g. 1.0.2" | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
|
||
- name: Install R dependencies | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: | | ||
any::desc | ||
any::devtools | ||
any::revdepcheck | ||
- name: Run release checks | ||
env: | ||
VERSION: ${{ inputs.version }} | ||
run: | | ||
source(".github/workflows/release-checklist.R") | ||
release_checklist(Sys.getenv("VERSION")) | ||
shell: Rscript {0} | ||
|
||
- name: Update NEWS.md version | ||
uses: jacobtomlinson/gha-find-replace@v3 | ||
with: | ||
find: "[unreleased]" | ||
replace: "usmap ${{ inputs.version }}" | ||
include: "NEWS.md" | ||
regex: false | ||
|
||
- 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 | ||
reviewers: pdil | ||
assignees: pdil | ||
labels: release | ||
delete-branch: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ Suggests: | |
rmarkdown, | ||
scales, | ||
sf, | ||
spelling, | ||
testthat (>= 3.0.0), | ||
vdiffr | ||
RoxygenNote: 7.3.1 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
Albers | ||
Bartholemew | ||
CRS | ||
Cordova | ||
DCW | ||
Esri | ||
Factbook | ||
Geospatial | ||
Grosvenor | ||
Kusilvak | ||
MULTILINESTRING | ||
McNally | ||
NGA | ||
README | ||
Rud | ||
Rudis | ||
USGS | ||
Vectorization | ||
Vectorize | ||
choropleth | ||
choropleths | ||
codecov | ||
expandability | ||
fips | ||
ggplot | ||
ggthemes | ||
github | ||
usmapdata | ||
️ |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
if (requireNamespace("spelling", quietly = TRUE)) | ||
spelling::spell_check_test( | ||
vignettes = TRUE, | ||
error = FALSE, | ||
skip_on_cran = TRUE | ||
) |