-
Notifications
You must be signed in to change notification settings - Fork 2
44 lines (41 loc) · 1.1 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
name: Release
on:
push:
tags: ['releases/[0-9]+.[0-9]+.[0-9]+']
jobs:
build:
uses: ./.github/workflows/build.yml
npm:
needs:
- build
runs-on: ubuntu-latest
permissions:
id-token: write
strategy:
fail-fast: false
matrix:
prepare-script:
- universal
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup node
uses: actions/setup-node@v3
with:
node-version: lts/hydrogen # 18
registry-url: https://registry.npmjs.org
always-auth: true
- name: Load cached dist
uses: actions/cache@v3
id: dist
with:
path: dist
key: dist-${{ hashFiles('src/**/*.ts', 'tsconfig.json', 'tsconfig/*.json', '.github/workflows/*.yml', 'package-lock.json') }}
fail-on-cache-miss: true
- name: Prepare distribution
run: node tools/publish-${{ matrix.prepare-script }}
- run: npm publish --provenance --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}