forked from unmojang/FjordLauncher
-
Notifications
You must be signed in to change notification settings - Fork 0
96 lines (89 loc) · 3.72 KB
/
trigger_release.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
name: Build Application and Make Release
on:
push:
tags:
- "*"
jobs:
build_release:
name: Build Release
uses: ./.github/workflows/build.yml
with:
build_type: Release
is_qt_cached: false
secrets:
SPARKLE_ED25519_KEY: ${{ secrets.SPARKLE_ED25519_KEY }}
WINDOWS_CODESIGN_CERT: ${{ secrets.WINDOWS_CODESIGN_CERT }}
WINDOWS_CODESIGN_PASSWORD: ${{ secrets.WINDOWS_CODESIGN_PASSWORD }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PRIVATE_KEY_ID: ${{ secrets.GPG_PRIVATE_KEY_ID }}
create_release:
needs: build_release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: "true"
path: "FjordLauncher-source"
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Grab and store version
run: |
tag_name=$(echo ${{ github.ref }} | grep -oE "[^/]+$")
echo "VERSION=$tag_name" >> $GITHUB_ENV
- name: Package artifacts properly
run: |
mv ${{ github.workspace }}/FjordLauncher-source FjordLauncher
mv FjordLauncher-Linux-Qt6-Portable*/FjordLauncher-portable.tar.gz FjordLauncher-Linux-Qt6-Portable.tar.gz
mv FjordLauncher-*.AppImage/FjordLauncher-*.AppImage FjordLauncher-Linux-x86_64.AppImage
mv FjordLauncher-*.AppImage.zsync/FjordLauncher-*.AppImage.zsync FjordLauncher-Linux-x86_64.AppImage.zsync
tar --exclude='.git' -czf FjordLauncher.tar.gz FjordLauncher
for d in FjordLauncher-Windows-MSVC*; do
cd "${d}" || continue
LEGACY="$(echo -n ${d} | grep -o Legacy || true)"
ARM64="$(echo -n ${d} | grep -o arm64 || true)"
INST="$(echo -n ${d} | grep -o Setup || true)"
PORT="$(echo -n ${d} | grep -o Portable || true)"
NAME="FjordLauncher-Windows-MSVC"
test -z "${LEGACY}" || NAME="${NAME}-Legacy"
test -z "${ARM64}" || NAME="${NAME}-arm64"
test -z "${PORT}" || NAME="${NAME}-Portable"
test -z "${INST}" || mv FjordLauncher-*.exe ../${NAME}-Setup.exe
test -n "${INST}" || zip -r -9 "../${NAME}.zip" *
cd ..
done
for d in FjordLauncher-Windows-MinGW-w64*; do
cd "${d}" || continue
INST="$(echo -n ${d} | grep -o Setup || true)"
PORT="$(echo -n ${d} | grep -o Portable || true)"
NAME="FjordLauncher-Windows-MinGW-w64"
test -z "${PORT}" || NAME="${NAME}-Portable"
test -z "${INST}" || mv FjordLauncher-*.exe ../${NAME}-Setup.exe
test -n "${INST}" || zip -r -9 "../${NAME}.zip" *
cd ..
done
- name: Create release
id: create_release
uses: softprops/action-gh-release@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}
name: Fjord Launcher ${{ env.VERSION }}
draft: false
prerelease: false
files: |
FjordLauncher-Linux-x86_64.AppImage
FjordLauncher-Linux-x86_64.AppImage.zsync
FjordLauncher-Linux-Qt6-Portable.tar.gz
FjordLauncher-Windows-MinGW-w64.zip
FjordLauncher-Windows-MinGW-w64-Portable.zip
FjordLauncher-Windows-MinGW-w64-Setup.exe
FjordLauncher-Windows-MSVC-arm64.zip
FjordLauncher-Windows-MSVC-arm64-Portable.zip
FjordLauncher-Windows-MSVC-arm64-Setup.exe
FjordLauncher-Windows-MSVC.zip
FjordLauncher-Windows-MSVC-Portable.zip
FjordLauncher-Windows-MSVC-Setup.exe
FjordLauncher.tar.gz