Skip to content
Open
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
4 changes: 4 additions & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,7 @@
^dev$
^\.posit$
^temp$
^CHANGELOG\.md$
^version\.txt$
^release-please-config\.json$
^\.release-please-manifest\.json$
32 changes: 32 additions & 0 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
pull_request:
branches: [main]

permissions:
contents: read

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
Expand Down Expand Up @@ -90,3 +93,32 @@ jobs:
error-on: '"error"'
args: 'c("--no-manual", "--ignore-vignettes", "--as-cran")'
build_args: 'c("--no-manual", "--no-build-vignettes")'

version-sync:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- name: Verify release-please can still bump DESCRIPTION
shell: bash
run: |
set -euo pipefail

# write.dcf() and desc::desc_set() silently drop comment lines, which
# would stop release-please bumping Version with no error anywhere.
for marker in '# x-release-please-start-version' '# x-release-please-end'; do
if ! grep -qxF "$marker" DESCRIPTION; then
echo "::error file=DESCRIPTION::Missing '$marker'. release-please can no longer update Version; restore the marker."
exit 1
fi
done

desc_version="$(sed -n 's/^Version:[[:space:]]*//p' DESCRIPTION | tr -d '[:space:]')"
manifest_version="$(jq -r '."."' .release-please-manifest.json)"

if [ "$desc_version" != "$manifest_version" ]; then
echo "::error::DESCRIPTION Version ($desc_version) != .release-please-manifest.json ($manifest_version). These must match; release-please updates both together."
exit 1
fi

echo "OK: markers present, version $desc_version in sync."
Comment thread
github-advanced-security[bot] marked this conversation as resolved.
Fixed
24 changes: 24 additions & 0 deletions .github/workflows/release-please.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Maintains a rolling "release PR" on main. Merging it tags the version and
# publishes a GitHub Release, which is what r-universe tracks ("branch": "*release").
name: Release Please

on:
push:
branches: [main]

permissions:
contents: write
pull-requests: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
".": "3.2.4"
}
2 changes: 2 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
Type: Package
Package: Pmetrics
Title: Pmetrics for Population Modeling and Simulation
# x-release-please-start-version
Version: 3.2.4
# x-release-please-end
Comment thread
mhovd marked this conversation as resolved.
Authors@R: c(
person("Michael", "Neely", , "mneely@usc.edu", role = c("aut", "cre")),
person("Julián", "Otálvaro", , "juliandavid347@gmail.com", role = "aut"),
Expand Down
58 changes: 58 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"packages": {
".": {
"release-type": "simple",
"package-name": "Pmetrics",
"changelog-path": "CHANGELOG.md",
"extra-files": [
{
"type": "generic",
"path": "DESCRIPTION"
}
],
"include-component-in-tag": false,
"include-v-in-tag": true,
"changelog-sections": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{
"type": "perf",
"section": "Performance"
},
{
"type": "deps",
"section": "Dependencies"
},
{
"type": "chore",
"section": "Maintenance"
},
{
"type": "docs",
"section": "Documentation"
},
{
"type": "refactor",
"section": "Refactoring"
},
{
"type": "ci",
"section": "Continuous Integration",
"hidden": true
},
{
"type": "test",
"section": "Tests",
"hidden": true
}
]
}
}
}
Loading