-
Notifications
You must be signed in to change notification settings - Fork 0
91 lines (76 loc) · 2.24 KB
/
build.yml
File metadata and controls
91 lines (76 loc) · 2.24 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
name: Build and Release Differon
on:
push:
tags:
- 'v*'
# Grant permissions to the workflow
permissions:
contents: write # Needed to create releases
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [windows-latest, ubuntu-latest]
fail-fast: false # Don't cancel other jobs if one fails
steps:
- name: Check out Git repository
uses: actions/checkout@v4
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 18
- name: Install dependencies
run: npm install
# Linux specific: Install required packages
- name: Install Linux build tools
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y rpm fakeroot dpkg
- name: Build Electron app
run: npm run dist
# Debug: List what was built
- name: List dist contents
run: |
echo "Contents of dist folder:"
ls -la dist/ || echo "dist folder not found"
shell: bash
- name: Upload build artifacts
uses: actions/upload-artifact@v4
if: always() # Upload even if previous steps failed
with:
name: ${{ matrix.os }}-installer
path: |
dist/*.exe
dist/*.msi
dist/*.AppImage
dist/*.deb
dist/*.rpm
dist/*.snap
dist/*.blockmap
if-no-files-found: warn # Warn instead of error if no files found
retention-days: 5
release:
needs: build
runs-on: ubuntu-latest
if: always() # Run even if some builds failed
steps:
- name: Download all artifacts
uses: actions/download-artifact@v4
with:
path: installers
# Debug: Show what artifacts we have
- name: Display structure of downloaded files
run: ls -R installers/
- name: Create Release
uses: softprops/action-gh-release@v1
with:
draft: true
files: |
installers/**/*.exe
installers/**/*.AppImage
installers/**/*.deb
fail_on_unmatched_files: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}