forked from eternalcodes/EternalJK
-
Notifications
You must be signed in to change notification settings - Fork 5
109 lines (92 loc) · 3.27 KB
/
build-universal2.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
97
98
99
100
101
102
103
104
105
106
107
108
109
name: build-universal2
on:
workflow_dispatch:
release:
types: [published]
jobs:
macos-universal2:
name: macOS ${{ matrix.arch }} ${{ matrix.build_type }} (${{ matrix.portable}})
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
arch: [universal2]
build_type: [Release]
portable: [Non-Portable]
steps:
- uses: actions/checkout@v4
- name: Get dependencies
run: |
brew update
brew install cmake dylibbundler sdl2 zlib libjpeg libpng
- name: Make build
run: |
chmod +x scripts/universal2/build_universal2.sh
chmod +x scripts/universal2/build_app_bundle.sh
chmod +x scripts/universal2/constants.sh
chmod +x scripts/universal2/sign_and_notarize.sh
./scripts/universal2/build_universal2.sh
- name: Create binary archive
if: ${{ matrix.build_type == 'Release' }}
working-directory: ${{ runner.workspace }}
shell: bash
run: |
tar -czvf TaystJK-macos-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}.tar.gz TaystJK/release/*
- uses: actions/upload-artifact@v3
if: ${{ matrix.build_type == 'Release' }}
with:
name: TaystJK-macos-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}
path: ${{ runner.workspace }}/TaystJK-macos-${{ matrix.arch }}-${{ matrix.build_type }}-${{ matrix.portable }}.tar.gz
if-no-files-found: error
create-latest:
if: github.event_name == 'workflow_dispatch' && github.ref == 'refs/heads/master'
needs: [macos-universal2]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Download Artifacts
uses: actions/download-artifact@v3
- name: Create binary archives
run: |
mv ./TaystJK-macos-arm64-Release-Non-Portable/* TaystJK-macos-universal2.tar.gz
- name: Create latest ub2 build
uses: crowbarmaster/GH-Automatic-Releases@latest
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
automatic_release_tag: "universal2"
prerelease: false
title: Universal2 Build
files: |
*.tar.gz
create-release:
if: github.event_name == 'release'
needs: [macos-universal2]
runs-on: ubuntu-latest
strategy:
matrix:
include:
- artifact_dir: TaystJK-macos-universal2.tar.gz
artifact_name: TaystJK-macos-universal2.tar.gz
zip: false
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Download Artifacts
uses: actions/download-artifact@v3
- name: Create archive
run: |
if [ "${{ matrix.zip }}" == "true" ]; then
7z a -r ${{ matrix.artifact_name }} ./${{ matrix.artifact_dir }}/* '-x!msvcp*.*' '-x!vcruntime*.*' '-x!concrt*.*'
else
mv ./${{ matrix.artifact_dir }}/* ${{ matrix.artifact_name }}
fi
- name: Upload archives
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.ref }}
overwrite: true
file: ${{ matrix.artifact_name }}