|
4 | 4 | # Triggers on any tag that looks like a version: v2.4.0, v3.0.0-beta.1, etc. |
5 | 5 | # |
6 | 6 | # Produces: |
7 | | -# β’ Windows β NSIS installer (.exe) β built on windows-latest |
8 | | -# β’ Linux β AppImage + .deb + .rpm |
9 | | -# + .pacman + .snap β built on ubuntu-latest |
| 7 | +# β’ Windows β NSIS installer (.exe) β built on windows-latest |
| 8 | +# |
| 9 | +# Linux builds (AppImage + .deb) are built locally and uploaded manually. |
10 | 10 | # |
11 | | -# Artifacts are attached to the GitHub Release that triggered the workflow. |
12 | 11 | # Create a release like this to trigger it: |
13 | 12 | # git tag v2.4.0 && git push origin v2.4.0 |
14 | 13 | # (then create the Release on GitHub, or use the gh CLI) |
@@ -63,101 +62,10 @@ jobs: |
63 | 62 | GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
64 | 63 | run: npx electron-builder --win --publish never |
65 | 64 |
|
66 | | - - name: Upload Windows artifact |
67 | | - uses: actions/upload-artifact@v4 |
68 | | - with: |
69 | | - name: bytebox-windows |
70 | | - path: release/**/*.exe |
71 | | - if-no-files-found: error |
72 | | - |
73 | | - # ββ Linux packages ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ |
74 | | - build-linux: |
75 | | - name: Linux packages |
76 | | - runs-on: ubuntu-latest |
77 | | - |
78 | | - steps: |
79 | | - - name: Checkout |
80 | | - uses: actions/checkout@v4 |
81 | | - |
82 | | - - name: Setup Node.js |
83 | | - uses: actions/setup-node@v4 |
84 | | - with: |
85 | | - node-version: 22 |
86 | | - cache: npm |
87 | | - |
88 | | - - name: Install system dependencies |
89 | | - # Required for better-sqlite3 native compile + rpm/snap packaging |
90 | | - run: | |
91 | | - sudo apt-get update |
92 | | - sudo apt-get install -y python3 make g++ rpm snapcraft |
93 | | -
|
94 | | - - name: Install dependencies |
95 | | - run: npm ci |
96 | | - |
97 | | - - name: Generate Prisma client |
98 | | - env: |
99 | | - DATABASE_URL: "file:./dev.db" |
100 | | - run: npx prisma generate |
101 | | - |
102 | | - - name: Build Next.js |
103 | | - env: |
104 | | - DATABASE_URL: "file:./dev.db" |
105 | | - NEXT_TELEMETRY_DISABLED: "1" |
106 | | - NODE_ENV: production |
107 | | - PORT: "1334" |
108 | | - run: npm run build |
109 | | - |
110 | | - - name: Compile Electron main process |
111 | | - run: npm run electron:compile |
112 | | - |
113 | | - - name: Package Linux installers |
114 | | - env: |
115 | | - GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
116 | | - # Pass --linux with explicit targets so snap is included in CI |
117 | | - # (snapcraft is available here; it's excluded from local builds) |
118 | | - run: npx electron-builder --linux AppImage deb rpm pacman snap --publish never |
119 | | - |
120 | | - - name: Upload Linux artifacts |
121 | | - uses: actions/upload-artifact@v4 |
122 | | - with: |
123 | | - name: bytebox-linux |
124 | | - path: | |
125 | | - release/**/*.AppImage |
126 | | - release/**/*.deb |
127 | | - release/**/*.rpm |
128 | | - release/**/*.pacman |
129 | | - release/**/*.snap |
130 | | - if-no-files-found: error |
131 | | - |
132 | | - # ββ Attach artifacts to the GitHub Release ββββββββββββββββββββββββββββββββββ |
133 | | - release: |
134 | | - name: Publish release assets |
135 | | - needs: [build-windows, build-linux] |
136 | | - runs-on: ubuntu-latest |
137 | | - |
138 | | - steps: |
139 | | - - name: Download Windows artifact |
140 | | - uses: actions/download-artifact@v4 |
141 | | - with: |
142 | | - name: bytebox-windows |
143 | | - path: dist/windows |
144 | | - |
145 | | - - name: Download Linux artifacts |
146 | | - uses: actions/download-artifact@v4 |
147 | | - with: |
148 | | - name: bytebox-linux |
149 | | - path: dist/linux |
150 | | - |
151 | 65 | - name: Upload to GitHub Release |
152 | 66 | uses: softprops/action-gh-release@v2 |
153 | 67 | with: |
154 | | - files: | |
155 | | - dist/windows/**/*.exe |
156 | | - dist/linux/**/*.AppImage |
157 | | - dist/linux/**/*.deb |
158 | | - dist/linux/**/*.rpm |
159 | | - dist/linux/**/*.pacman |
160 | | - dist/linux/**/*.snap |
161 | | - fail_on_unmatched_files: false |
| 68 | + files: release/**/*.exe |
| 69 | + fail_on_unmatched_files: true |
162 | 70 | env: |
163 | 71 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
0 commit comments