Skip to content

harden...

harden... #49

name: submit-CRAN
on:
push:
branches: [main, master]
tags: [ '*.*' ]
pull_request:
branches: [main, master]
env:
DEBUG_CI: true
jobs:
release:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macOS-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: r-lib/actions/setup-r@v2
with:
r-version: 'release'
- uses: r-lib/actions/setup-r-dependencies@v2
- run: |
cd ..; R CMD build templr
mkdir templr/CRAN-${{ matrix.os }}
mv templr_*.* templr/CRAN-${{ matrix.os }}/.
shell: bash
name: R CMD build
- run: |
R CMD check --as-cran --no-manual CRAN-${{ matrix.os }}/templr* || (
test -f templr.Rcheck/00install.out && cat templr.Rcheck/00install.out | sed -e 's/^/00install.out| /';
exit 1
)
shell: bash
name: R CMD check
- uses: actions/upload-artifact@v4
with:
name: CRAN-${{ matrix.os }}
path: CRAN-${{ matrix.os }}/
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./CRAN-*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}