Skip to content

Commit ca32381

Browse files
committed
add release flow
1 parent 27400b0 commit ca32381

File tree

1 file changed

+68
-0
lines changed

1 file changed

+68
-0
lines changed

.github/workflows/release.yml

Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
name: Release
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build-macos:
9+
runs-on: macos-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Cache SDL
14+
uses: actions/cache@v4
15+
with:
16+
path: MacOS/frameworks/sdl
17+
key: sdl-macos-2.32.10-${{ runner.os }}-${{ runner.arch }}
18+
restore-keys: |
19+
sdl-macos-2.32.10-
20+
21+
- name: Install build dependencies
22+
run: |
23+
brew install cmake pkg-config nasm
24+
25+
- name: Build macOS (x86_64 + arm64)
26+
run: |
27+
cd MacOS
28+
make
29+
30+
- name: Zip application bundle
31+
run: zip -r -y "MacOS/release/Kiwi8-macOS.zip" "MacOS/release/Kiwi8.app"
32+
33+
- name: Upload to Release
34+
uses: softprops/action-gh-release@v2
35+
with:
36+
files: MacOS/release/Kiwi8-macOS.zip
37+
38+
build-windows:
39+
runs-on: windows-latest
40+
steps:
41+
- uses: actions/checkout@v4
42+
43+
- name: Cache SDL
44+
uses: actions/cache@v4
45+
with:
46+
path: Windows/frameworks/sdl
47+
key: sdl-windows-2.32.10-${{ runner.os }}-${{ runner.arch }}
48+
restore-keys: |
49+
sdl-windows-2.32.10-
50+
51+
- name: Configures build environment for AMD64
52+
uses: ilammy/msvc-dev-cmd@v1
53+
with:
54+
arch: amd64
55+
56+
- name: Build Windows (x64)
57+
shell: cmd
58+
run: |
59+
cd Windows
60+
nmake
61+
62+
- name: Create Zip Archive
63+
run: Compress-Archive -Path Windows\release\* -DestinationPath Windows\release\Kiwi8-Windows.zip
64+
65+
- name: Upload to Release
66+
uses: softprops/action-gh-release@v2
67+
with:
68+
files: Windows\release\Kiwi8-Windows.zip

0 commit comments

Comments
 (0)