-
Notifications
You must be signed in to change notification settings - Fork 1
53 lines (44 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
name: Build and Publish Electron App
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: '14'
- name: Install dependencies
run: |
npm install
- name: Build Electron app
run: |
npm run build:win
- name: Create release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.event.release.tag_name }}
release_name: Release ${{ github.event.release.tag_name }}
- name: Upload artifact
uses: actions/upload-artifact@v2
with:
name: electron-app
path: 'dist/schoolboxdrive Setup 0.1.0.exe'
- name: Publish release
id: publish_release
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: 'dist/schoolboxdrive Setup 0.1.0.exe'
asset_name: electron-app.exe
asset_content_type: application/zip