Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
overhaul workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
kingaa committed Sep 4, 2024
1 parent 459a292 commit 5349e26
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 11 deletions.
30 changes: 23 additions & 7 deletions .github/workflows/binary-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,13 @@ jobs:
fail-fast: false

steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2.3.1
- uses: r-lib/actions/setup-r@v2
with:
r-version: latest

- uses: r-lib/actions/setup-r-dependencies@v2.3.1
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: |
any::pkgbuild
Expand All @@ -36,9 +36,9 @@ jobs:
mkdir -p ${{ github.workspace }}/artifacts
cp ${{ env.release_name }}.tar.gz ${{ github.workspace }}/artifacts
- uses: actions/upload-artifact@v3.1.1
- uses: actions/upload-artifact@v4
with:
name: Source tarball
name: source_tarball
path: ${{ github.workspace }}/artifacts/${{ env.release_name }}.tar.gz

binary_build:
Expand All @@ -54,7 +54,7 @@ jobs:
- {os: windows-latest, r: 'release', ext: "zip"}

steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand All @@ -74,7 +74,23 @@ jobs:
mkdir -p ${{ github.workspace }}/artifacts
cp ../${{ env.release_name }}.${{ matrix.config.ext }} ${{ github.workspace }}/artifacts
- uses: actions/upload-artifact@v3.1.1
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.config.os }}-${{ matrix.config.r }}
path: ${{ github.workspace }}/artifacts/${{ env.release_name }}.${{ matrix.config.ext }}

# Workflow derived from https://github.com/marketplace/actions/create-release
create_release:
needs: [ source_build, binary_build ]
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
path: artifacts
- uses: ncipollo/release-action@v1
with:
draft: true
artifacts: "artifacts/*/*"
10 changes: 10 additions & 0 deletions .github/workflows/r-cmd-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ on:
push:
branches:
- '*'
paths:
- Rpkg/DESCRIPTION
- Rpkg/NAMESPACE
- Rpkg/R/**
- Rpkg/src/**
- Rpkg/tests/**
- Rpkg/man/**
- Rpkg/data/**
pull_request:
workflow_dispatch:

Expand Down Expand Up @@ -37,6 +45,8 @@ jobs:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true
extra-repositories: |
https://kingaa.github.io/
- uses: r-lib/actions/setup-r-dependencies@v2
with:
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/test-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches:
- '*'
branches: [master]
pull_request:
branches: [master]
workflow_dispatch:
branches:
- '*'

name: test-coverage

jobs:
Expand All @@ -19,7 +18,7 @@ jobs:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}

steps:
- uses: actions/checkout@v3.1.0
- uses: actions/checkout@v4

- uses: r-lib/actions/setup-r@v2
with:
Expand Down

0 comments on commit 5349e26

Please sign in to comment.