-
Notifications
You must be signed in to change notification settings - Fork 0
62 lines (56 loc) · 1.59 KB
/
release-manual.yml
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
name: Manual Release
on:
workflow_dispatch:
inputs:
os:
description: 'Operating Systems (comma-separated, no spaces)'
required: false
default: 'ubuntu-latest,macos-latest,windows-latest'
jobs:
generate-matrix:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
steps:
- id: set-matrix
run: |
INPUT_OS="${{ github.event.inputs.os }}"
MATRIX=$(echo "[\"$(echo ${INPUT_OS} | sed 's/,/","/g')\"]")
echo "matrix=$MATRIX" >> $GITHUB_OUTPUT
build:
needs: generate-matrix
strategy:
matrix:
os: ${{ fromJson(needs.generate-matrix.outputs.matrix) }}
arch: [x64, arm64]
uses: ./.github/workflows/build-electron.yml
with:
os: ${{ matrix.os }}
arch: ${{ matrix.arch }}
secrets: inherit
release:
needs: build
runs-on: ubuntu-latest
steps:
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
path: .
merge-multiple: true # Merge files into the root
- name: Rename Files and Move to Release
run: |
mkdir -p release
for file in *; do
if [ -f "$file" ]; then
new_name=$(echo "$file" | sed -E 's/-[0-9]+\.[0-9]+\.[0-9]+//')
mv "$file" "release/$new_name"
fi
done
- name: Create Manual Release
uses: softprops/action-gh-release@v2
with:
draft: true
name: manual-release
files: release/* # Correct path to the renamed files
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}