diff --git a/.github/workflows/update-codemeta.yaml b/.github/workflows/update-codemeta.yaml new file mode 100644 index 0000000..734ab31 --- /dev/null +++ b/.github/workflows/update-codemeta.yaml @@ -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" diff --git a/codemeta.json b/codemeta.json new file mode 100644 index 0000000..f676c79 --- /dev/null +++ b/codemeta.json @@ -0,0 +1,83 @@ +{ + "@context": "https://doi.org/10.5063/schema/codemeta-2.0", + "@type": "SoftwareSourceCode", + "identifier": "rdeps", + "description": "Screens all '.R', '.Rmd', and '.qmd' files to extract the name of packages used in a project. This package detects packages called with 'library(foo)', 'require(foo)', and 'foo::bar()' and adds these dependencies in the DESCRIPTION file in the sections Depends, Imports, and Suggests.", + "name": "rdeps: Identify External Packages Used in a Project", + "codeRepository": "https://github.com/frbcesab/rdeps", + "issueTracker": "https://github.com/frbcesab/rdeps/issues", + "license": "https://spdx.org/licenses/GPL-2.0", + "version": "0.2", + "programmingLanguage": { + "@type": "ComputerLanguage", + "name": "R", + "url": "https://r-project.org" + }, + "runtimePlatform": "R version 4.3.2 (2023-10-31 ucrt)", + "author": [ + { + "@type": "Person", + "givenName": "Nicolas", + "familyName": "Casajus", + "email": "nicolas.casajus@fondationbiodiversite.fr", + "@id": "https://orcid.org/0000-0002-5537-5294" + } + ], + "copyrightHolder": [ + { + "@type": "Person", + "givenName": "Nicolas", + "familyName": "Casajus", + "email": "nicolas.casajus@fondationbiodiversite.fr", + "@id": "https://orcid.org/0000-0002-5537-5294" + } + ], + "maintainer": [ + { + "@type": "Person", + "givenName": "Nicolas", + "familyName": "Casajus", + "email": "nicolas.casajus@fondationbiodiversite.fr", + "@id": "https://orcid.org/0000-0002-5537-5294" + } + ], + "softwareRequirements": { + "1": { + "@type": "SoftwareApplication", + "identifier": "cli", + "name": "cli", + "provider": { + "@id": "https://cran.r-project.org", + "@type": "Organization", + "name": "Comprehensive R Archive Network (CRAN)", + "url": "https://cran.r-project.org" + }, + "sameAs": "https://CRAN.R-project.org/package=cli" + }, + "2": { + "@type": "SoftwareApplication", + "identifier": "utils", + "name": "utils" + }, + "SystemRequirements": null + }, + "fileSize": "213.947KB", + "citation": [ + { + "@type": "SoftwareSourceCode", + "datePublished": "2023", + "author": [ + { + "@type": "Organization", + "name": "Casajus Nicolas" + } + ], + "name": "rdeps: {An} {R} package to identify external packages used in a project", + "url": "https://github.com/frbcesab/rdeps", + "description": "R package version 0.2" + } + ], + "releaseNotes": "https://github.com/frbcesab/rdeps/blob/master/NEWS.md", + "readme": "https://github.com/FRBCesab/rdeps/blob/main/README.md", + "contIntegration": ["https://github.com/frbcesab/rdeps/actions/workflows/R-CMD-check.yaml", "https://github.com/frbcesab/rdeps/actions/workflows/pkgdown.yaml"] +}