From 52156e007f8c243e40f149db6e2869d731d75e1b Mon Sep 17 00:00:00 2001 From: Tymoteusz Makowski Date: Tue, 9 Apr 2024 15:42:24 +0200 Subject: [PATCH 1/3] ci: limit triggers to PRs, push to main, and a manual trigger --- .github/workflows/ci.yml | 7 ++++++- .github/workflows/e2e-test.yml | 8 ++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 060703cd..5d64f377 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,5 +1,10 @@ name: CI -on: [push, pull_request] +on: + push: + branches: + - main + pull_request: + workflow_dispatch: permissions: contents: read jobs: diff --git a/.github/workflows/e2e-test.yml b/.github/workflows/e2e-test.yml index 2be0b0f1..83cabbbf 100644 --- a/.github/workflows/e2e-test.yml +++ b/.github/workflows/e2e-test.yml @@ -1,6 +1,10 @@ -on: [push, pull_request] - name: E2E Test +on: + push: + branches: + - main + pull_request: + workflow_dispatch: defaults: run: From 8e080655f81865a30af51330cd81f4614d3a7405 Mon Sep 17 00:00:00 2001 From: Tymoteusz Makowski Date: Fri, 19 Apr 2024 14:15:35 +0200 Subject: [PATCH 2/3] refactor: update workflow template triggers The workflow will now run on PRs, pushes to main, and a manual trigger. --- NEWS.md | 7 +++++++ .../github_ci/dot.github/workflows/rhino-test.yml | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/NEWS.md b/NEWS.md index 40ece402..1615853b 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,13 @@ # rhino (development version) 1. New `box_alphabetical_imports_linter` checks if all imports are alphabetically sorted. +2. Update GitHub Workflow template triggers. To update your workflow run: + ```r + file.copy( + system.file("templates", "github_ci", "dot.github", "workflows", "rhino-test.yml", package = "rhino"), + file.path(".github", "workflows", "rhino-test.yml") + ) + ``` # [rhino 1.7.0](https://github.com/Appsilon/rhino/releases/tag/v1.7.0) diff --git a/inst/templates/github_ci/dot.github/workflows/rhino-test.yml b/inst/templates/github_ci/dot.github/workflows/rhino-test.yml index 678d22a8..b6c85664 100644 --- a/inst/templates/github_ci/dot.github/workflows/rhino-test.yml +++ b/inst/templates/github_ci/dot.github/workflows/rhino-test.yml @@ -1,5 +1,13 @@ name: Rhino Test -on: push +on: + # Run on pushes to 'main' branch + push: + branches: + - main + # Run on any opened pull request + pull_request: + # Run manually via GitHub Actions website + workflow_dispatch: permissions: contents: read jobs: From 5e9d3c389a0bf5d0db413b303c19b8157aac63da Mon Sep 17 00:00:00 2001 From: Tymoteusz Makowski Date: Tue, 23 Apr 2024 15:29:31 +0200 Subject: [PATCH 3/3] docs: update CONTRIBUTING.md --- .github/CONTRIBUTING.md | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 3f4ca83e..d070b489 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -75,12 +75,14 @@ for the `main` branch should be green). 2. Update `DESCRIPTION`. * Bump the package version according to [SemVer](https://semver.org/). Drop the development version (last component, e.g. `.9001`). - 3. Update `NEWS.md`. + 3. Create a migration guide. + * Refer to `NEWS.md` for hints on what to include in the guide. + 4. Update `NEWS.md`. * Replace the `(development version)` with `X.Y.Z` in the header. Do not add a link to GitHub releases yet - the link won't work and will fail CRAN checks. * Edit the list of changes to make it useful and understandable for our users. See [keep a changelog](https://keepachangelog.com/) for some guidelines. - 4. Submit the changes in a pull request titled "Release X.Y.Z". + 5. Submit the changes in a pull request titled "Release X.Y.Z". Get it approved and merged. ### Submitting to CRAN @@ -134,3 +136,4 @@ Starting with `1.0.0`, all versions should be released to CRAN. 1. The PR has at least 1 approval and 0 change requests. 2. The CI passes (`R CMD check`, linter, unit tests, spelling). 3. The change is thoroughly documented. + * Namely, `NEWS.md` is updated and if applicable contains a hint on how to migrate.