Skip to content

Commit

Permalink
doc: add codemeta
Browse files Browse the repository at this point in the history
  • Loading branch information
ahasverus committed Feb 1, 2024
1 parent 7218e5e commit 1a4b1d9
Show file tree
Hide file tree
Showing 3 changed files with 473 additions and 0 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@
^CONTRIBUTING\.md$
^CODE_OF_CONDUCT\.md$
^NEWS\.md$
^codemeta\.json$
43 changes: 43 additions & 0 deletions .github/workflows/update-codemeta.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
on:
release:
types: [published]
push:
branches: [master, main]
paths:
- DESCRIPTION
- inst/CITATION
- README.md
workflow_dispatch:

name: Update codemeta.json

jobs:
update-codemeta:
runs-on: macos-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::codemetar
- name: Update codemeta.json
run: |
library(codemetar)
# Update codemeta.json
write_codemeta()
shell: Rscript {0}

- name: Commit results
run: |
git config --local user.name "$GITHUB_ACTOR"
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
git add codemeta.json
git commit -m 'Update codemeta.json' || echo "No changes to commit"
git push origin || echo "No changes to commit"
Loading

0 comments on commit 1a4b1d9

Please sign in to comment.