-
Notifications
You must be signed in to change notification settings - Fork 21
50 lines (45 loc) · 1.56 KB
/
windows.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
# This is a basic workflow to help you get started with Actions
name: 'Windows Build'
on:
create:
tags:
- '*'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
runs-on: 'windows-latest'
steps:
- uses: actions/checkout@v2
- name: Use Node.js
uses: actions/setup-node@v1
with:
node-version: 16
- name: Install node-gyp
shell: powershell
run: |
npm install --global node-gyp@latest
npm prefix -g | % {npm config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js"}
- name: Install Dependencies
run: npm install --force
- uses: olegtarasov/[email protected]
id: tagName
- name: Set Version Number
run: |
npx replace-in-files-cli --string="##version##" --replacement="${{ steps.tagName.outputs.tag }}" "src/**/*" "scripts/**/*"
- run: node "./scripts/version.script.js"
#- name: Check lint
# run: npm run lint
- name: Build the app
env:
CSC_LINK: ${{ secrets.CSC_LINK_WINDOWS_BASE64 }}
CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD_WINDOWS }}
run: npm run electron:windows
- run: node "./scripts/copy-file.js"
- name: Publish Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG_NAME }}
files: |
release/*.exe