Upgraded stucco package (#25) #75
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
on: | |
push: | |
tags: | |
- 'v[0-9]+.[0-9]+.[0-9]+' | |
name: stucco-js release | |
jobs: | |
build: | |
strategy: | |
matrix: | |
node: [18] | |
platform: [ubuntu-latest, macos-latest, windows-latest] | |
runs-on: ${{ matrix.platform }} | |
steps: | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node }} | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Get npm cache directory | |
id: npm-cache | |
run: | | |
echo "::set-output name=dir::$(npm config get cache)" | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.npm-cache.outputs.dir }} | |
key: ${{ matrix.platform }}-node-${{ matrix.node }}-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ matrix.platform }}-node-${{ matrix.node }} | |
- name: install deps | |
run: npm ci | |
- name: run lint | |
run: npm run lint | |
- name: run tests | |
run: npm run test | |
if: matrix.platform != 'ubuntu-latest' # Do not run this on ubuntu, more at: https://github.com/facebook/jest/issues/11438 | |
- name: build library for e2e tests | |
run: npm run build | |
- name: build integration tests | |
working-directory: ./e2e/server/testdata | |
run: npx tsc | |
- name: run e2e tests for plugin integration | |
run: npm run test:e2e | |
- name: remove symlinks breaking cache | |
run: npx rimraf ./e2e/server/testdata/node_modules | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: setup node | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: 'https://registry.npmjs.org' | |
- name: checkout | |
uses: actions/checkout@v3 | |
- name: Get npm cache directory | |
id: npm-cache | |
run: | | |
echo "::set-output name=dir::$(npm config get cache)" | |
- uses: actions/cache@v3 | |
with: | |
path: ${{ steps.npm-cache.outputs.dir }} | |
key: ${{ matrix.platform }}-node-${{ matrix.node }}-${{ hashFiles('package-lock.json') }} | |
restore-keys: | | |
${{ matrix.platform }}-node-${{ matrix.node }} | |
- name: install deps | |
run: npm install | |
- name: run build | |
run: npm run build | |
- name: run publish | |
run: npm publish | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |