-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (48 loc) · 1.25 KB
/
release.yml
File metadata and controls
53 lines (48 loc) · 1.25 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
name: Release CI
on:
release:
types:
- edited
env:
CI: true
GITHUB_BRANCH: ${{ github.ref }}
GITHUB_HEAD_REF: ${{ github.head_ref }}
GITHUB_BASE_REF: ${{ github.base_ref }}
GITHUB_COMMIT: ${{ github.sha }}
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest]
node-version: [20.x]
steps:
- uses: actions/checkout@v4.1.1
- name: Use Node.js ${{ matrix.node-version }} on ${{ matrix.os }}
uses: actions/setup-node@v4.0.0
with:
node-version: ${{ matrix.node-version }}
registry-url: 'https://registry.npmjs.org/'
- name: nodejs project information
id: projectinfo
uses: gregoranders/nodejs-project-info@master
- name: npm install
run: |
npm install
- name: npm test
run: |
npm test
- name: npm run build
run: |
npm run build
- name: npm publish npm
run: |
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- uses: actions/setup-node@v4.0.0
with:
registry-url: 'https://npm.pkg.github.com'
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}