Skip to content

Commit

Permalink
Merge pull request #573 from TymekDev/ci-trigger-update
Browse files Browse the repository at this point in the history
ci: limit triggers to PRs, push to main, and a manual trigger
  • Loading branch information
TymekDev committed Apr 23, 2024
2 parents 1f1f61f + 5e9d3c3 commit 8066bfb
Show file tree
Hide file tree
Showing 5 changed files with 33 additions and 6 deletions.
7 changes: 5 additions & 2 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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.
7 changes: 6 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
name: CI
on: [push, pull_request]
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: read
jobs:
Expand Down
8 changes: 6 additions & 2 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
on: [push, pull_request]

name: E2E Test
on:
push:
branches:
- main
pull_request:
workflow_dispatch:

defaults:
run:
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -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)

Expand Down
10 changes: 9 additions & 1 deletion inst/templates/github_ci/dot.github/workflows/rhino-test.yml
Original file line number Diff line number Diff line change
@@ -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:
Expand Down

0 comments on commit 8066bfb

Please sign in to comment.