Skip to content

Commit 01a0a33

Browse files
authored
Merge pull request #398 from cmu-delphi/devMainUseProposal
Versioning Proposal
2 parents c554e10 + af454f8 commit 01a0a33

File tree

7 files changed

+77
-13
lines changed

7 files changed

+77
-13
lines changed

.github/version_bump_options.json

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
{
2+
"scheme": "semantic",
3+
"versionFile": "./DESCRIPTION",
4+
"files": [],
5+
"rules": [
6+
{
7+
"trigger": "commit",
8+
"branch": "dev",
9+
"bump": "build"
10+
},
11+
{
12+
"trigger": "commit",
13+
"bump": "minor",
14+
"branch": "main",
15+
"tag": true,
16+
"reset": "build"
17+
}
18+
]
19+
}
+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# this action: https://github.com/marketplace/actions/version-bumper
2+
# also see the options file for configuration
3+
name: Manage versions
4+
5+
# not actually on all pushes, see the options file
6+
on: [push]
7+
8+
jobs:
9+
bump:
10+
#if: github.event.pull_request.merged == true
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
# Checkout action is required
15+
- uses: actions/checkout@v2
16+
- uses: actions/setup-node@v1
17+
with:
18+
node-version: "12"
19+
- name: Bump Versions
20+
uses: michmich112/version-bumper@master
21+
with:
22+
options-file: "./.github/version_bump_options.json"
23+
github-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/pkgdown.yaml

+9-3
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# Created with usethis + edited to run on PRs to dev, use API key.
55
on:
66
push:
7-
branches: [main, dev]
7+
branches: [dev, main]
88
pull_request:
9-
branches: [main, dev]
9+
branches: [dev, main]
1010
release:
1111
types: [published]
1212
workflow_dispatch:
@@ -40,7 +40,13 @@ jobs:
4040
- name: Build site
4141
env:
4242
DELPHI_EPIDATA_KEY: ${{ secrets.SECRET_EPIPROCESS_GHACTIONS_DELPHI_EPIDATA_KEY }}
43-
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
43+
run: |
44+
if (startsWith("${{ GITHUB_EVENT_NAME }}", "pull_request")) {
45+
mode <- ifelse("${{ GITHUB_BASE_REF }}" == "main", "release", "devel")
46+
} else {
47+
mode <- ifelse("${{ GITHUB_REF_NAME }}" == "main", "release", "devel")
48+
}
49+
pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE, override=list(PKGDOWN_DEV_MODE=mode))
4450
shell: Rscript {0}
4551

4652
- name: Deploy to GitHub pages 🚀

.github/workflows/release-helper.yaml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Release Helper
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
sync_dev:
10+
needs: correct_repository
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out code
14+
uses: actions/checkout@v3
15+
with:
16+
ref: dev
17+
fetch-depth: 0
18+
ssh-key: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_SSH }}
19+
- name: Reset dev branch
20+
run: |
21+
git fetch origin main:main
22+
git merge main
23+
git push

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: epiprocess
33
Title: Tools for basic signal processing in epidemiology
4-
Version: 0.7.2.9999
4+
Version: 0.7.2
55
Authors@R: c(
66
person("Jacob", "Bien", role = "ctb"),
77
person("Logan", "Brooks", role = "aut"),

NEWS.md

+2-7
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,7 @@
88

99
# epiprocess 0.7.1.9999
1010

11-
Note that `epiprocess` uses the [Semantic Versioning
12-
("semver")](https://semver.org/) scheme for all release versions, but any
13-
inter-release development versions will include an additional ".9999" suffix.
14-
Pre-1.0.0 numbering scheme: when making changes to a development version
15-
0.x.y.9999, we will increment y when merging PRs, and will have increment x (and
16-
reset y) on release.
11+
Pre-1.0.0 numbering scheme: 0.x will indicate releases, while 0.7.x will indicate PR's.
1712

1813
## Breaking changes
1914

@@ -24,7 +19,7 @@ reset y) on release.
2419
* `select` on grouped `epi_df`s now only drops `epi_df`ness if it makes sense; PR #390
2520
* Minor documentation updates; PR #393
2621

27-
# epiprocess 0.7.0.9999
22+
# epiprocess 0.7.0
2823

2924
## Improvements
3025

_pkgdown.yml

-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
template:
22
bootstrap: 5
33

4-
development:
5-
mode: auto
64

75
# Colors from epipredict & epidatr, including Carnegie Red https://www.cmu.edu/brand/brand-guidelines/visual-identity/colors.html
86
navbar:

0 commit comments

Comments
 (0)