Skip to content

Merge branch 'develop' #21

Merge branch 'develop'

Merge branch 'develop' #21

Workflow file for this run

name: Generate NEWS.md
on:
push:
branches:
- main
- develop
workflow_dispatch:
permissions: read-all
jobs:
#generate_changelog:
# uses: ./.github/workflows/changelog.yml
generate_news:
#needs: [generate_changelog]
runs-on: ubuntu-latest
permissions:
contents: write
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup R
uses: r-lib/actions/setup-r@v2
with:
use-public-rspm: true
- name: Install pak
run: |
Rscript -e 'install.packages("pak", repos = sprintf("https://r-lib.github.io/p/pak/stable/%s/%s/%s", .Platform$pkgType, R.Version()$os, R.Version()$arch))'
- name: Install Package Dependencies
run: |
Rscript -e 'pak::local_install_deps(".", upgrade=FALSE, ask=FALSE, dependencies = TRUE)'
- name: Generate NEWS.md
run: |
Rscript -e 'pkgload::load_all(); noclocksr::generate_news(output_file = "NEWS.md", input_file = "CHANGELOG.md", overwrite = TRUE)'
- name: Commit and push changes
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
set +e
git add NEWS.md
git commit -m "docs: Update NEWS.md" || echo "No changes to commit"
git pull --ff-only
git push origin