Merge pull request #42 from rstudio/aron-docker-compose #160
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: main | |
on: | |
push: | |
branches: [main] | |
tags: [v*] | |
pull_request: | |
branches: [main] | |
env: | |
RSC_LICENSE: ${{ secrets.RSC_LICENSE }} | |
jobs: | |
main: | |
strategy: | |
matrix: | |
os: | |
- ubuntu-latest | |
node: | |
- 18.x | |
- 20.x | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ matrix.node }} | |
- run: npm install | |
- run: make | |
- run: git diff --exit-code | |
- if: failure() | |
run: docker compose logs | |
- run: make down | |
- run: printf '//registry.npmjs.org/:_authToken=%s\n' "${NPM_AUTH_TOKEN}" | tee .npmrc | |
env: | |
NPM_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | |
- run: npm info | |
- if: matrix.node == '20.x' && startsWith(github.ref, 'refs/tags') | |
run: npm publish | |
- if: startsWith(github.ref, 'refs/heads') | |
run: npm publish --dry-run |