main.yaml: Update #4
Workflow file for this run
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
name: CI | |
on: | |
push: | |
branches: | |
- main | |
- 'scratch/**' | |
tags: | |
- 'v*' | |
pull_request: | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
name: Tests (renv = ${{ matrix.config.renv }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- renv: true | |
- renv: false | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install system dependencies | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install libcurl4-openssl-dev | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: 4.3.1 | |
use-public-rspm: true | |
- name: Install renv | |
if: matrix.config.renv | |
uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
packages: 'any::renv' | |
- name: Test | |
shell: bash | |
run: make vt-test | |
env: | |
PKGR_TESTS_SYS_RENV: ${{ matrix.config.renv && '1' || '' }} | |
release: | |
if: github.ref_type == 'tag' | |
name: Make release | |
needs: check | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: actions/setup-go@v5 | |
with: | |
go-version: stable | |
- name: Run GoReleaser | |
uses: goreleaser/goreleaser-action@v6 | |
with: | |
distribution: goreleaser | |
version: '~> v2' | |
args: release --clean | |
workdir: cmd/bbi | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |