Skip to content

11.0.0

11.0.0 #93

Workflow file for this run

name: publish
on:
push:
branches:
- '*'
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: master
- uses: volta-cli/action@v1
- name: Authorize NPM
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: latest
run_install: true
- run: pnpm lint
- run: pnpm test
publish-npm:
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2
with:
ref: master
- uses: volta-cli/action@v1
- name: Authorize NPM
run: npm config set //registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}
- name: Cache pnpm modules
uses: actions/cache@v2
with:
path: ~/.pnpm-store
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-
- uses: pnpm/[email protected]
with:
version: latest
run_install: true
- run: |
pnpm build
pnpm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}