-
Notifications
You must be signed in to change notification settings - Fork 10
49 lines (36 loc) · 1 KB
/
publish-npm.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
45
46
47
48
49
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Publish NPM
on:
workflow_dispatch:
# release:
# types:
# - created
env:
NODE_VERSION: lts/*
jobs:
publish-npm:
if: github.repository_owner == 'AliMD'
name: Publish NPM
runs-on: ubuntu-latest
permissions:
contents: read
security-events: write
steps:
- name: ⤵️ Checkout repository
uses: actions/checkout@v4.1.1
- name: 🏗 Setup nodejs
uses: actions/setup-node@v4.0.0
with:
node-version: ${{env.NODE_VERSION}}
registry-url: https://registry.npmjs.org/
cache: yarn
- name: 🏗 Install dependencies
run: yarn install --frozen-lockfile
- name: 🏗 Build Typescript
run: yarn build
# - name: 🚀 Extra Packages Build
# run: yarn build:r
- name: 🚀 Publish
run: yarn run publish --yes
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}