|
7 | 7 | pull_request: |
8 | 8 | branches: [ "develop" ] |
9 | 9 |
|
10 | | -permissions: |
11 | | - contents: write |
12 | | - |
13 | 10 | env: |
14 | 11 | CARGO_TERM_COLOR: always |
15 | 12 | RUST_BACKTRACE: 1 |
@@ -153,7 +150,7 @@ jobs: |
153 | 150 | run: | |
154 | 151 | cargo test --frozen -p sameold --verbose --no-default-features --features "${{ matrix.features }}" |
155 | 152 |
|
156 | | - # Test and release samedec on Linux, via containers |
| 153 | + # Make release build of samedec for Linux, via containers |
157 | 154 | release_samedec_linux: |
158 | 155 | runs-on: ubuntu-latest |
159 | 156 |
|
@@ -211,39 +208,12 @@ jobs: |
211 | 208 | cp /install/bin/samedec /install/bin/samedec-${{ matrix.target }} |
212 | 209 |
|
213 | 210 | - name: Store artifact |
214 | | - uses: actions/upload-artifact@v4 |
| 211 | + uses: actions/upload-artifact@v5 |
215 | 212 | with: |
216 | 213 | name: samedec-${{ matrix.target }} |
217 | 214 | path: /install/bin/samedec-${{ matrix.target }} |
218 | 215 | retention-days: 3 |
219 | 216 |
|
220 | | - - name: Upload tagged release (tags only) |
221 | | - uses: svenstaro/upload-release-action@v2 |
222 | | - if: startsWith(github.ref, 'refs/tags/samedec-') |
223 | | - with: |
224 | | - repo_token: ${{ secrets.GITHUB_TOKEN }} |
225 | | - file: /install/bin/samedec-${{ matrix.target }} |
226 | | - overwrite: true |
227 | | - |
228 | | - - name: Update tag for nightly release (develop-branch only) |
229 | | - uses: richardsimko/update-tag@v1 |
230 | | - if: github.ref == 'refs/heads/develop' |
231 | | - with: |
232 | | - tag_name: latest |
233 | | - env: |
234 | | - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
235 | | - |
236 | | - - name: Upload nightly release (develop-branch only) |
237 | | - uses: svenstaro/upload-release-action@v2 |
238 | | - if: github.ref == 'refs/heads/develop' |
239 | | - with: |
240 | | - tag: "latest" |
241 | | - release_name: "Nightly Release" |
242 | | - body: "This is a rolling release built from the latest `develop` branch." |
243 | | - prerelease: true |
244 | | - file: /install/bin/samedec-${{ matrix.target }} |
245 | | - overwrite: true |
246 | | - |
247 | 217 | # MacOS and Windows builds |
248 | 218 | release_samedec_nonlinux: |
249 | 219 | strategy: |
@@ -323,35 +293,84 @@ jobs: |
323 | 293 | cp "$samedec_exe" "$samedec_target_exe" |
324 | 294 |
|
325 | 295 | - name: Store artifact |
326 | | - uses: actions/upload-artifact@v4 |
| 296 | + uses: actions/upload-artifact@v5 |
327 | 297 | with: |
328 | 298 | name: samedec-${{ env.CARGO_BUILD_TARGET }} |
329 | 299 | path: ${{ env.samedec_target_exe }} |
330 | 300 | retention-days: 3 |
331 | 301 |
|
332 | | - - name: Upload tagged release (tags only) |
333 | | - uses: svenstaro/upload-release-action@v2 |
334 | | - if: startsWith(github.ref, 'refs/tags/samedec-') |
| 302 | + # Publish nightly builds |
| 303 | + publish_nightly: |
| 304 | + runs-on: ubuntu-latest |
| 305 | + |
| 306 | + if: github.ref == 'refs/heads/develop' |
| 307 | + |
| 308 | + permissions: |
| 309 | + contents: write |
| 310 | + |
| 311 | + needs: |
| 312 | + - test_sameold |
| 313 | + - release_samedec_linux |
| 314 | + - release_samedec_nonlinux |
| 315 | + |
| 316 | + name: Publish Nightly |
| 317 | + |
| 318 | + steps: |
| 319 | + |
| 320 | + - name: Download All Artifacts |
| 321 | + uses: actions/download-artifact@v5 |
335 | 322 | with: |
336 | | - repo_token: ${{ secrets.GITHUB_TOKEN }} |
337 | | - file: ${{ env.samedec_target_exe }} |
338 | | - overwrite: true |
| 323 | + path: publish |
| 324 | + pattern: samedec-* |
| 325 | + merge-multiple: true |
339 | 326 |
|
340 | 327 | - name: Update tag for nightly release (develop-branch only) |
341 | 328 | uses: richardsimko/update-tag@v1 |
342 | | - if: github.ref == 'refs/heads/develop' |
343 | 329 | with: |
344 | 330 | tag_name: latest |
345 | 331 | env: |
346 | 332 | GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
347 | 333 |
|
348 | 334 | - name: Upload nightly release (develop-only) |
349 | 335 | uses: svenstaro/upload-release-action@v2 |
350 | | - if: github.ref == 'refs/heads/develop' |
351 | 336 | with: |
352 | 337 | tag: "latest" |
353 | 338 | release_name: "Nightly Release" |
354 | 339 | body: "This is a rolling release built from the latest `develop` branch." |
355 | 340 | prerelease: true |
356 | | - file: ${{ env.samedec_target_exe }} |
| 341 | + file_glob: true |
| 342 | + file: publish/samedec-* |
| 343 | + overwrite: true |
| 344 | + |
| 345 | + # Publish tagged release |
| 346 | + publish_tag: |
| 347 | + runs-on: ubuntu-latest |
| 348 | + |
| 349 | + if: startsWith(github.ref, 'refs/tags/samedec-') |
| 350 | + |
| 351 | + permissions: |
| 352 | + contents: write |
| 353 | + |
| 354 | + needs: |
| 355 | + - test_sameold |
| 356 | + - release_samedec_linux |
| 357 | + - release_samedec_nonlinux |
| 358 | + |
| 359 | + name: Publish Tag |
| 360 | + |
| 361 | + steps: |
| 362 | + |
| 363 | + - name: Download All Artifacts |
| 364 | + uses: actions/download-artifact@v5 |
| 365 | + with: |
| 366 | + path: publish |
| 367 | + pattern: samedec-* |
| 368 | + merge-multiple: true |
| 369 | + |
| 370 | + - name: Upload tagged release (tags only) |
| 371 | + uses: svenstaro/upload-release-action@v2 |
| 372 | + with: |
| 373 | + repo_token: ${{ secrets.GITHUB_TOKEN }} |
| 374 | + file_glob: true |
| 375 | + file: publish/samedec-* |
357 | 376 | overwrite: true |
0 commit comments