-
Notifications
You must be signed in to change notification settings - Fork 52
67 lines (67 loc) · 2.33 KB
/
publish.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
61
62
63
64
65
66
67
name: Publish to NPM
on:
workflow_dispatch:
inputs:
major:
description: "Major"
type: boolean
default: false
minor:
description: "Minor"
type: boolean
default: false
jobs:
publish_job:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- name: Setup emsdk
uses: mymindstorm/setup-emsdk@v11
with:
version: 3.1.43
actions-cache-folder: "emsdk-cache"
- name: Setup Git config
run: |
git config --local user.email '[email protected]'
git config --local user.name ${{ github.actor }}
- uses: actions/setup-node@v2
with:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"
- name: Install premake
run: |
wget https://github.com/premake/premake-core/releases/download/v5.0.0-alpha16/premake-5.0.0-alpha16-linux.tar.gz
tar -xvf premake-5.0.0-alpha16-linux.tar.gz
sudo chmod a+x premake5
sudo mv premake5 /usr/local/bin
- name: Install modules
run: cd js && npm install
- name: Setup Ninja
uses: seanmiddleditch/gha-setup-ninja@master
- if: ${{ inputs.major == true }}
name: Major Release - Bump version number, update changelog, push and tag
run: npm run release:major
working-directory: ./js
env:
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }}
PAT_GITHUB: ${{ secrets.PAT_GITHUB }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- if: ${{inputs.major == false && inputs.minor == true}}
name: Minor release - Bump version number, update changelog, push and tag
run: npm run release:minor
working-directory: ./js
env:
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }}
PAT_GITHUB: ${{ secrets.PAT_GITHUB }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- if: ${{inputs.major == false && inputs.minor == false}}
name: Patch release - Bump version number, update changelog, push and tag
run: npm run release:patch
working-directory: ./js
env:
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }}
PAT_GITHUB: ${{ secrets.PAT_GITHUB }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}