-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (51 loc) · 1.33 KB
/
Copy pathrelease.yml
File metadata and controls
56 lines (51 loc) · 1.33 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
name: Release
permissions:
contents: read
on:
push:
tags:
- v*
concurrency:
group: release
cancel-in-progress: true
jobs:
test_and_build:
name: Test & Build
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 20
- run: corepack enable
- run: corepack prepare yarn@4.13.0 --activate
- run: corepack yarn --version
- run: corepack yarn install --immutable
- run: corepack yarn lint
- run: corepack yarn coverage
env:
NCAPTCHA_SECRET: ${{ secrets.NCAPTCHA_SECRET }}
- run: corepack yarn build
publish:
name: Publish Package
runs-on: ubuntu-latest
needs: [test_and_build]
permissions:
contents: write
id-token: write
environment: release
steps:
- uses: actions/checkout@v7
- uses: actions/setup-node@v7
with:
node-version: 20
registry-url: 'https://registry.npmjs.org'
- run: corepack enable
- run: corepack prepare yarn@4.13.0 --activate
- run: corepack yarn --version
- run: corepack yarn install --immutable
- run: corepack yarn build
- name: Publish to npm
run: corepack yarn npm publish --access public --provenance