-
Notifications
You must be signed in to change notification settings - Fork 2
48 lines (46 loc) · 1.12 KB
/
main.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
---
'on':
push:
paths-ignore:
- '**.md'
pull_request:
paths-ignore:
- '**.md'
workflow_dispatch:
# https://github.com/softprops/action-gh-release/issues/236
permissions:
contents: write
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Enable corepack
run: |
corepack enable
- uses: actions/setup-node@v4
with:
node-version: latest
registry-url: https://registry.npmjs.org
cache: 'yarn'
- name: Install dependencies
run: |
sudo apt-get -y update
sudo apt-get -y install librime-dev libjson-c-dev librime1 libjson-c5
yarn
- name: Build
run: |
yarn pack
env:
NODE_ENV: production
- uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: '*.tgz'
- name: Publish
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
NODE_ENV: production
if: startsWith(github.ref, 'refs/tags/')
run: |
npm publish