-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (67 loc) · 2.14 KB
/
Copy pathrelease.yml
File metadata and controls
78 lines (67 loc) · 2.14 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
name: Release
# Triggered when a semver tag is pushed. Also
# runnable manually from the Actions UI — pick a tag ref to build from,
# optionally with dry_run=true to skip the GitHub Release step and only
# produce workflow artifacts.
#
# Platform builds are reusable workflows, one per target:
# macOS arm64 -> build-macos.yml (DMG + checksum)
# Windows x64 -> build-windows.yml (portable ZIP + checksum)
# Both are gated on `publish` via `needs:`, so a failing platform build blocks
# the release rather than shipping a half-populated one.
on:
push:
tags:
- '[0-9]*.[0-9]*.[0-9]*'
workflow_dispatch:
inputs:
dry_run:
description: 'Skip GitHub Release publication; only upload workflow artifacts'
required: false
default: false
type: boolean
permissions:
contents: read
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
macos:
name: macOS arm64
uses: ./.github/workflows/build-macos.yml
permissions:
contents: read
windows:
name: Windows x64
uses: ./.github/workflows/build-windows.yml
permissions:
contents: read
publish:
name: Publish GitHub Release
needs: [macos, windows]
runs-on: ubuntu-24.04
timeout-minutes: 10
if: >-
startsWith(github.ref, 'refs/tags/') &&
(github.event_name != 'workflow_dispatch' || inputs.dry_run != true)
permissions:
contents: write
steps:
- name: Download all build artifacts
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
path: artifacts
- name: List downloaded files
run: find artifacts -type f -print
- name: Create or update GitHub Release
uses: softprops/action-gh-release@efb35369e0ad2afab669f228072c1b0d510eae64 # v3.0.3
with:
tag_name: ${{ github.ref_name }}
name: ${{ github.ref_name }}
generate_release_notes: true
fail_on_unmatched_files: true
files: |
artifacts/**/*.dmg
artifacts/**/*.dmg.sha256
artifacts/**/*.zip
artifacts/**/*.zip.sha256