-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (57 loc) · 1.71 KB
/
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
on:
workflow_dispatch:
push:
tags:
- "v*.*.*"
jobs:
build:
permissions:
contents: write
name: Build
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.0.x'
- name: Build
shell: bash
run: for i in 86 64; do dotnet publish -p:PublishProfile=Deployx$i; done
- name: Zip x86 & x64 console app builds
if: startsWith(github.ref, 'refs/tags/')
shell: bash
run: |
echo "::group::7-zip into zip and xz, 32 & 64-bit"
for arch in 86 64; do
for fmt in zip exe.xz; do
{
cd "build_x${arch}"
7z a -bd -bt -mx=9 ../"ClutchFixer_x${arch}.${fmt}" "ClutchFixer.exe"
} &
done
done
wait
echo "::endgroup::"
- name: Make the release and uploads built bin packages
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
files: |
ClutchFixer_x86.zip
ClutchFixer_x64.zip
ClutchFixer_x86.exe.xz
ClutchFixer_x64.exe.xz
- name: Upload x86 binary as artifact
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v3
with:
name: ClutchFix-x86
path: build_x86/*.exe
if-no-files-found: error
- name: Upload x86_64 binary as artifact
if: ${{ github.event_name == 'workflow_dispatch' }}
uses: actions/upload-artifact@v3
with:
name: ClutchFix-x64
path: build_x64/*.exe
if-no-files-found: error