Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update GitHub templates and workflows
- Loading branch information
1 parent
c839852
commit e1fea90
Showing
13 changed files
with
139 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
--- | ||
name: Custom issue template | ||
about: Describe this issue template's purpose here. | ||
name: Custom issue | ||
about: Ask about a specific problem. | ||
title: '' | ||
labels: '' | ||
assignees: '' | ||
|
||
--- | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
# https://github.com/r-hyperspec/hySpc.chondro/blob/develop/.github/workflows/drat--insert-package.yaml | ||
|
||
on: | ||
release: | ||
types: | ||
- published | ||
|
||
name: drat | ||
|
||
jobs: | ||
drat: | ||
runs-on: ubuntu-20.04 | ||
|
||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
REPO: ${{ github.event.repository.name }} | ||
RELEASE: ${{ github.event.release.tag_name }} | ||
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v1 | ||
|
||
- uses: r-lib/actions/setup-pandoc@v1 | ||
|
||
- name: Query dependencies | ||
run: | | ||
install.packages('remotes') | ||
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2) | ||
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version") | ||
shell: Rscript {0} | ||
|
||
- name: Restore R package cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ env.R_LIBS_USER }} | ||
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }} | ||
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1- | ||
|
||
- name: Install system dependencies | ||
run: | | ||
while read -r cmd | ||
do | ||
eval sudo $cmd | ||
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))') | ||
- name: Install dependencies | ||
run: | | ||
remotes::install_deps(dependencies = TRUE) | ||
install.packages(c("pkgbuild", "drat")) | ||
shell: Rscript {0} | ||
|
||
- name: Build source package | ||
run: | | ||
dir.create("build", showWarnings = FALSE) | ||
pkgbuild::build(dest_path = "build", binary = FALSE, vignettes = TRUE, manual = FALSE) | ||
shell: Rscript {0} | ||
|
||
- name: Configure git | ||
# https://stackoverflow.com/a/60548651/633251 | ||
env: | ||
TOKEN: ${{ secrets.ACCESS_TOKEN }} | ||
run: | | ||
git config --global url."https://${TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/" | ||
git config --global user.email "${REPO}@tesselle.org" | ||
git config --global user.name "${REPO}" | ||
- name: Clone tesselle/packages | ||
if: success() | ||
run: | | ||
rm -rf tmp | ||
git clone https://github.com/tesselle/packages.git tmp | ||
- name: Insert package | ||
if: success() | ||
run: | | ||
targz <- list.files(path = "build", pattern = "\\.tar\\.gz", full.names = TRUE) | ||
drat::insertPackage(file = targz, repodir = "tmp", action = "archive", location = "docs") | ||
shell: Rscript {0} | ||
|
||
- name: Deploy | ||
if: success() | ||
run: | | ||
cd tmp | ||
git add * | ||
# .tar.gz files are globally blocked (git ignored) by git, | ||
# must add manually and force it | ||
git add -f *.tar.gz | ||
git commit -m "Add ${REPO} ${RELEASE}" | ||
git push origin master | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters