Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Versioning Proposal #398

Merged
merged 18 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions .github/version_bump_options.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{
"scheme": "semantic",
"versionFile": "./DESCRIPTION",
"files": [],
"rules": [
{
"trigger": "commit",
"branch": "dev",
"bump": "build"
},
{
"trigger": "commit",
"bump": "minor",
"branch": "main",
"tag": true,
"reset": "build"
}
]
}
23 changes: 23 additions & 0 deletions .github/workflows/auto_semver_bump.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# this action: https://github.com/marketplace/actions/version-bumper
# also see the options file for configuration
name: Manage versions

# not actually on all pushes, see the options file
on: [push]

jobs:
bump:
#if: github.event.pull_request.merged == true
runs-on: ubuntu-latest

steps:
# Checkout action is required
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: "12"
- name: Bump Versions
uses: michmich112/version-bumper@master
with:
options-file: "./.github/version_bump_options.json"
github-token: ${{ secrets.GITHUB_TOKEN }}
12 changes: 9 additions & 3 deletions .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@
# Created with usethis + edited to run on PRs to dev, use API key.
on:
push:
branches: [main, dev]
branches: [dev, main]
pull_request:
branches: [main, dev]
branches: [dev, main]
release:
types: [published]
workflow_dispatch:
Expand Down Expand Up @@ -40,7 +40,13 @@ jobs:
- name: Build site
env:
DELPHI_EPIDATA_KEY: ${{ secrets.SECRET_EPIPROCESS_GHACTIONS_DELPHI_EPIDATA_KEY }}
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
run: |
if (startsWith("${{ GITHUB_EVENT_NAME }}", "pull_request")) {
mode <- ifelse("${{ GITHUB_BASE_REF }}" == "main", "release", "devel")
} else {
mode <- ifelse("${{ GITHUB_REF_NAME }}" == "main", "release", "devel")
}
pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE, override=list(PKGDOWN_DEV_MODE=mode))
shell: Rscript {0}

- name: Deploy to GitHub pages 🚀
Expand Down
23 changes: 23 additions & 0 deletions .github/workflows/release-helper.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Release Helper

on:
push:
branches:
- main

jobs:
sync_dev:
needs: correct_repository
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
ref: dev
fetch-depth: 0
ssh-key: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_SSH }}
- name: Reset dev branch
run: |
git fetch origin main:main
git merge main
git push
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: epiprocess
Title: Tools for basic signal processing in epidemiology
Version: 0.7.2.9999
Version: 0.7.2
Authors@R: c(
person("Jacob", "Bien", role = "ctb"),
person("Logan", "Brooks", role = "aut"),
Expand Down
9 changes: 2 additions & 7 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,7 @@

# epiprocess 0.7.1.9999

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

## Breaking changes

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

# epiprocess 0.7.0.9999
# epiprocess 0.7.0

## Improvements

Expand Down
2 changes: 0 additions & 2 deletions _pkgdown.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
template:
bootstrap: 5

development:
mode: auto

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