mirror of
https://github.com/danbulant/jose
synced 2026-05-19 20:38:42 +00:00
BREAKING CHANGE: All module named exports have moved from subpaths to
just "jose". For example, `import { jwtVerify } from 'jose/jwt/verify'`
is now just `import { jwtVerify } from 'jose'`.
BREAKING CHANGE: All submodule default exports and named have been
removed in favour of just "jose" named exports.
58 lines
1.5 KiB
YAML
58 lines
1.5 KiB
YAML
name: NPM Publish
|
|
|
|
on:
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
publish:
|
|
runs-on: ubuntu-latest
|
|
continue-on-error: true
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
prepare-script:
|
|
- browser
|
|
- node-cjs
|
|
- node-esm
|
|
- universal
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Setup node
|
|
uses: actions/setup-node@v2
|
|
with:
|
|
node-version: 14
|
|
registry-url: https://registry.npmjs.org
|
|
always-auth: true
|
|
- run: npm install --global npm@7
|
|
- name: Load cached dist
|
|
uses: actions/cache@v2
|
|
id: dist
|
|
with:
|
|
path: dist
|
|
key: dist-${{ hashFiles('src/**/*.ts') }}-${{ hashFiles('tsconfig/*.json') }}-${{ hashFiles('.github/workflows/*.yml') }}-${{ hashFiles('package.json') }}
|
|
- name: Prepare distribution
|
|
run: node tools/publish-${{ matrix.prepare-script }}
|
|
- run: npm publish
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
|
|
push:
|
|
needs:
|
|
- publish
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- run: git push origin $GITHUB_SHA:v4.x
|
|
- run: git rm -r dist/**/*
|
|
- run: |
|
|
git config --local user.email "panva.ip@gmail.com"
|
|
git config --local user.name "Filip Skokan"
|
|
git commit -m "chore: cleanup after publish"
|
|
- run: git push origin HEAD:main
|