-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a workflow step to increase dev version automatically
+ refactor all jobs in one main workflow
- Loading branch information
Showing
5 changed files
with
79 additions
and
54 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
name: increase-dev-version | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
change-version: | ||
runs-on: ubuntu-latest | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
permissions: write-all | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- name: Install packages | ||
run: | | ||
install.packages("usethis") | ||
shell: Rscript {0} | ||
|
||
- name: Change DESCRIPTION file | ||
run: | | ||
if(usethis:::is_dev_version()){ | ||
desc::desc_set_version(version = usethis:::bump_version()[["dev"]]) | ||
} | ||
shell: Rscript {0} | ||
|
||
- uses: EndBug/add-and-commit@v9 | ||
if: ${{ success() }} | ||
with: | ||
message: '🤖 Bump development version.' | ||
default_author: github_actions | ||
add: 'DESCRIPTION' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
name: Main-Workflow | ||
|
||
on: | ||
push: | ||
branches: [main, develop] | ||
pull_request: | ||
branches: [main, develop] | ||
|
||
|
||
jobs: | ||
increase-dev-version: # only do that when actually merging in main/develop branch | ||
if: github.event_name != 'pull_request' | ||
uses: ./.github/workflows/increase-dev-version.yaml | ||
R-CMD-Check: | ||
if: ${{ always() }} | ||
uses: Open-Systems-Pharmacology/Workflows/.github/workflows/R-CMD-check-build.yml@main | ||
with: | ||
install-pksim: true | ||
install-rClr: true | ||
extra-packages: | | ||
ospsuite.utils=github::Open-Systems-Pharmacology/OSPSuite.RUtils | ||
tlf=github::Open-Systems-Pharmacology/TLF-Library | ||
test-coverage: | ||
if: ${{ always() }} | ||
needs: [R-CMD-Check] | ||
uses: Open-Systems-Pharmacology/Workflows/.github/workflows/test-pkg-and-coverage.yml@main | ||
with: | ||
install-pksim: true | ||
install-rClr: true | ||
extra-packages: | | ||
ospsuite.utils=github::Open-Systems-Pharmacology/OSPSuite.RUtils | ||
tlf=github::Open-Systems-Pharmacology/TLF-Library | ||
pkgdown: | ||
if: ${{ always() }} | ||
needs: [R-CMD-Check] | ||
uses: Open-Systems-Pharmacology/Workflows/.github/workflows/pkgdown.yml@main | ||
with: | ||
install-pksim: true | ||
install-rClr: true | ||
extra-packages: | | ||
ospsuite.utils=github::Open-Systems-Pharmacology/OSPSuite.RUtils | ||
tlf=github::Open-Systems-Pharmacology/TLF-Library |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.