-
Notifications
You must be signed in to change notification settings - Fork 2
98 lines (85 loc) · 2.26 KB
/
Copy pathnightly.yml
File metadata and controls
98 lines (85 loc) · 2.26 KB
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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: Nightly Build Release
on:
push:
branches:
- master
workflow_dispatch:
permissions:
contents: write
jobs:
build:
name: Build on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
strategy:
matrix:
os: [windows-latest, macos-latest]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'npm'
- name: Install dependencies
run: npm install
- name: Build Windows App
if: matrix.os == 'windows-latest'
run: npm run build:win
env:
# Required for some native modules or dependencies if any
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Build macOS App
if: matrix.os == 'macos-latest'
run: npm run build:mac
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: app-builds-${{ matrix.os }}
path: |
dist/*.exe
dist/*.dmg
retention-days: 7
release:
name: Update Nightly Release
needs: build
runs-on: ubuntu-latest
env:
LANG: en_US.UTF-8
LC_ALL: en_US.UTF-8
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Download Artifacts
uses: actions/download-artifact@v4
with:
pattern: app-builds-*
path: dist
merge-multiple: true
- name: Delete old Nightly Release and Tag
run: |
gh release delete nightly --cleanup-tag -y || true
git push --delete origin nightly || true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create Nightly Release
uses: softprops/action-gh-release@v2
with:
tag_name: nightly
target_commitish: ${{ github.sha }}
name: "Nightly Build"
body: "Automated nightly build for commit ${{ github.sha }}"
prerelease: true
make_latest: true
files: |
dist/*.exe
dist/*.dmg
update: true