-
Notifications
You must be signed in to change notification settings - Fork 1
60 lines (49 loc) · 1.31 KB
/
build.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
50
51
52
53
54
55
56
57
58
59
60
name: Build
on:
push:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: '18.x'
registry-url: 'https://registry.npmjs.org'
- uses: Swatinem/rust-cache@v2
- name: Check out code
uses: actions/checkout@v3
- name: Cargo
run: |
cargo install wasm-pack
- name: Increment version
run: |
git config --local user.name actions-user
git config --local user.email "actions@github.com"
npm version patch -m "Update patch version"
- name: Build
run: |
npm run build
- name: Test
run: |
npm run test
- name: Upload module
uses: actions/upload-artifact@v3
with:
name: conditions
path: |
pkg/*
if-no-files-found: error
- name: Commit new version
run: |
git push -f origin main
- name: Publish
run: |
cp package.json pkg/package.json
tar -czf pufferpanel-conditions.tar.gz pkg/*
npm publish pufferpanel-conditions.tar.gz
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}