From 98beb3fe68117891421a9816270c65c05112a0b2 Mon Sep 17 00:00:00 2001 From: Drew Herren Date: Mon, 27 Oct 2025 23:56:50 -0500 Subject: [PATCH] Simple workflow for custom release candidate branches --- .../workflows/r-custom-release-candidate.yml | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/r-custom-release-candidate.yml diff --git a/.github/workflows/r-custom-release-candidate.yml b/.github/workflows/r-custom-release-candidate.yml new file mode 100644 index 00000000..3952b8c4 --- /dev/null +++ b/.github/workflows/r-custom-release-candidate.yml @@ -0,0 +1,52 @@ +on: + workflow_dispatch: + +name: Create a Special Branch for Unmerged Release Candidates + +jobs: + testing: + name: r-custom-release-candidate + runs-on: ubuntu-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write + + steps: + - uses: actions/checkout@v4 + with: + ref: 'pr-temp-rc' + submodules: 'recursive' + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::testthat, any::decor + + - name: Create CRAN-formatted source package in stochtree_cran subfolder + run: | + Rscript cran-bootstrap.R + + - name: Copy a release candidate-specific README.md to stochtree_cran + run: | + cp RC_README.md stochtree_cran/README.md + + - name: Copy demo scripts + run: | + mkdir -p stochtree_cran/tools + cp tools/debug/cloglog_ordinal_bart_binary.R stochtree_cran/tools/cloglog_ordinal_bart_binary.R + cp tools/debug/cloglog_ordinal_bart_three_category.R stochtree_cran/tools/cloglog_ordinal_bart_three_category.R + cp tools/debug/cloglog_ordinal_bart_four_category.R stochtree_cran/tools/cloglog_ordinal_bart_four_category.R + + - name: Deploy to CRAN dev branch + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + clean: false + branch: cloglog-bart-rc + folder: stochtree_cran \ No newline at end of file