jose/.github/workflows/publish.yml
2021-03-12 21:41:45 +01:00

36 lines
843 B
YAML

name: NPM Publish
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
strategy:
fail-fast: false
continue-on-error: true
matrix:
prepare-script:
- browser
- node-cjs
- node-esm
- universal
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 14
- name: Load cached dist
uses: actions/cache@v2
id: dist
with:
path: dist
key: dist-${{ hashFiles('src/**/*.ts') }}-${{ hashFiles('tsconfig/*.json') }}
- name: Prepare distribution
run: node tools/publish-${{ matrix.prepare-script }}
- run: npm publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}