-
Notifications
You must be signed in to change notification settings - Fork 0
76 lines (68 loc) · 2.39 KB
/
release-gui-collect.yml
File metadata and controls
76 lines (68 loc) · 2.39 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
name: Collect GUI Release
on:
workflow_call:
inputs:
version:
required: true
type: string
permissions:
contents: write
jobs:
publish-release:
runs-on: ubuntu-24.04
timeout-minutes: 15
steps:
- uses: actions/checkout@v6
- name: Download all GUI artifacts
uses: actions/download-artifact@v8
with:
path: artifacts/gui
pattern: gui-*
merge-multiple: true
- name: Download all CLI binary artifacts
uses: actions/download-artifact@v8
with:
path: artifacts/cli
pattern: cli-*
merge-multiple: true
- name: Clean up unnecessary macOS artifacts
run: |
find artifacts/gui -name '*.icns' -delete
find artifacts/gui -name 'Info.plist' -delete
- name: Verify release artifacts
shell: bash
run: |
installer_count=$(find artifacts/gui -type f \( -name '*.dmg' -o -name '*.exe' -o -name '*.msi' -o -name '*.AppImage' -o -name '*.deb' -o -name '*.rpm' \) | wc -l | tr -d ' ')
updater_count=$(find artifacts/gui -type f \( -name '*.sig' -o -name '*.tar.gz' -o -name '*.zip' \) | wc -l | tr -d ' ')
cli_archive_count=$(find artifacts/cli -type f \( -name '*.tar.gz' -o -name '*.zip' \) | wc -l | tr -d ' ')
if [ "$installer_count" -eq 0 ]; then
echo "ERROR: no GUI installer artifacts were downloaded"
exit 1
fi
if [ "$updater_count" -eq 0 ]; then
echo "ERROR: no GUI updater artifacts were downloaded"
exit 1
fi
if [ "$cli_archive_count" -ne 5 ]; then
echo "ERROR: expected 5 CLI release archives, found ${cli_archive_count}"
exit 1
fi
- name: Publish Release
uses: softprops/action-gh-release@v2.6.1
with:
tag_name: v${{ inputs.version }}
name: v${{ inputs.version }}
files: |
artifacts/gui/**/*.dmg
artifacts/gui/**/*.exe
artifacts/gui/**/*.msi
artifacts/gui/**/*.AppImage
artifacts/gui/**/*.deb
artifacts/gui/**/*.rpm
artifacts/gui/**/*.sig
artifacts/gui/**/*.tar.gz
artifacts/gui/**/*.zip
artifacts/cli/**/*.tar.gz
artifacts/cli/**/*.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}