-
-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (63 loc) · 1.85 KB
/
release.yaml
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
68
69
70
71
72
73
name: Release
on: workflow_dispatch
jobs:
bundle-javascript:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v2
with:
node-version: 14
registry-url: https://registry.npmjs.org/
- name: install dependencies
run: npm ci
- name: bundle javascript files
run: npm run build
- name: publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: upload bundled javascript file
uses: actions/upload-artifact@v2
with:
name: cithak-bundle
path: build/file/cithak.js
retention-days: 1
build-executable:
needs: ['bundle-javascript']
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: checkout
uses: actions/checkout@v2
- name: setup node
uses: actions/setup-node@v2
with:
node-version: 14
- name: download javascript bundle file
uses: actions/download-artifact@v2
with:
name: cithak-bundle
path: build/file/
- name: install dependencies
run: npm ci
- name: install pkg
run: npm install -D pkg
- name: install resourcehacker
if: ${{ matrix.os == 'windows-latest' }}
run: npm install -D node-resourcehacker
- name: build executable
run: npm run build-${{ matrix.os }}
- name: change executable icon
if: ${{ matrix.os == 'windows-latest' }}
run: node scripts/setIcon.js
- name: add to release
uses: softprops/action-gh-release@v1
with:
files: build/bin/cithak*
draft: true
tag_name: release-${{ github.sha }}