Skip to content

Commit a8c37ea

Browse files
committed
Update release workflow
1 parent 30a5a66 commit a8c37ea

File tree

2 files changed

+40
-34
lines changed

2 files changed

+40
-34
lines changed

.github/workflows/release.yml

Lines changed: 40 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ jobs:
1717

1818
steps:
1919
- name: Clone
20-
uses: actions/checkout@v3
20+
uses: actions/checkout@v4
2121

2222
- name: Setup Java
23-
uses: actions/setup-java@v2
23+
uses: actions/setup-java@v3
2424
with:
2525
distribution: temurin
2626
java-version: 11
2727
cache: gradle
2828

2929
- name: Cache cmake build
30-
uses: actions/cache@v3
30+
uses: actions/cache@v4
3131
with:
3232
path: os/android/app/.cxx
3333
key: android-cmake-v1
@@ -51,22 +51,22 @@ jobs:
5151
run: |
5252
cd os/android/app/build/outputs/apk/release
5353
cp app-release.apk fallout-ce-android.apk
54-
gh release upload ${{ github.ref_name }} fallout-ce-android.apk
54+
gh release upload ${{ github.event.release.tag_name }} fallout-ce-android.apk
5555
rm fallout-ce-android.apk
5656
env:
5757
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5858

5959
ios:
6060
name: iOS
6161

62-
runs-on: macos-11
62+
runs-on: macos-12
6363

6464
steps:
6565
- name: Clone
66-
uses: actions/checkout@v3
66+
uses: actions/checkout@v4
6767

6868
- name: Cache cmake build
69-
uses: actions/cache@v3
69+
uses: actions/cache@v4
7070
with:
7171
path: build
7272
key: ios-cmake-v1
@@ -75,25 +75,31 @@ jobs:
7575
run: |
7676
cmake \
7777
-B build \
78-
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
7978
-D CMAKE_TOOLCHAIN_FILE=cmake/toolchain/ios.toolchain.cmake \
8079
-D ENABLE_BITCODE=0 \
8180
-D PLATFORM=OS64 \
81+
-G Xcode \
82+
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY='' \
8283
# EOL
8384
8485
- name: Build
8586
run: |
8687
cmake \
8788
--build build \
89+
--config RelWithDebInfo \
8890
-j $(sysctl -n hw.physicalcpu) \
89-
--target package \
9091
# EOL
9192
93+
- name: Pack
94+
run: |
95+
cd build
96+
cpack -C RelWithDebInfo
97+
9298
- name: Upload
9399
run: |
94100
cd build
95-
cp fallout-ce.zip fallout-ce-ios.ipa
96-
gh release upload ${{ github.ref_name }} fallout-ce-ios.ipa
101+
cp fallout-ce.ipa fallout-ce-ios.ipa
102+
gh release upload ${{ github.event.release.tag_name }} fallout-ce-ios.ipa
97103
rm fallout-ce-ios.ipa
98104
env:
99105
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -112,7 +118,7 @@ jobs:
112118

113119
steps:
114120
- name: Clone
115-
uses: actions/checkout@v3
121+
uses: actions/checkout@v4
116122

117123
- name: Dependencies (x86)
118124
if: matrix.arch == 'x86'
@@ -129,7 +135,7 @@ jobs:
129135
sudo apt install libsdl2-dev zlib1g-dev
130136
131137
- name: Cache cmake build
132-
uses: actions/cache@v3
138+
uses: actions/cache@v4
133139
with:
134140
path: build
135141
key: linux-${{ matrix.arch }}-cmake-v1
@@ -162,7 +168,7 @@ jobs:
162168
run: |
163169
cd build
164170
tar -czvf fallout-ce-linux-${{ matrix.arch }}.tar.gz fallout-ce
165-
gh release upload ${{ github.ref_name }} fallout-ce-linux-${{ matrix.arch }}.tar.gz
171+
gh release upload ${{ github.event.release.tag_name }} fallout-ce-linux-${{ matrix.arch }}.tar.gz
166172
rm fallout-ce-linux-${{ matrix.arch }}.tar.gz
167173
env:
168174
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -174,16 +180,16 @@ jobs:
174180

175181
steps:
176182
- name: Clone
177-
uses: actions/checkout@v3
183+
uses: actions/checkout@v4
178184

179185
- name: Import code signing certificates
180-
uses: apple-actions/import-codesign-certs@v1
186+
uses: apple-actions/import-codesign-certs@v2
181187
with:
182188
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_FILE_BASE64 }}
183189
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_PASSWORD }}
184190

185191
- name: Cache cmake build
186-
uses: actions/cache@v3
192+
uses: actions/cache@v4
187193
with:
188194
path: build
189195
key: macos-cmake-v3
@@ -192,26 +198,33 @@ jobs:
192198
run: |
193199
cmake \
194200
-B build \
195-
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
196-
-D CPACK_BUNDLE_APPLE_CERT_APP="${{ secrets.APPLE_DEVELOPER_CERTIFICATE_IDENTITY }}" \
201+
-G Xcode \
202+
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY="${{ secrets.APPLE_DEVELOPER_CERTIFICATE_IDENTITY }}" \
203+
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_INJECT_BASE_ENTITLEMENTS="NO" \
204+
-D CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS="--options=runtime --timestamp" \
197205
# EOL
198206
199207
- name: Build
200208
run: |
201209
cmake \
202210
--build build \
211+
--config RelWithDebInfo \
203212
-j $(sysctl -n hw.physicalcpu) \
204-
--target package \
205213
# EOL
206214
215+
- name: Pack
216+
run: |
217+
cd build
218+
cpack -C RelWithDebInfo
219+
207220
- name: Notarize
208221
run: |
209222
brew install mitchellh/gon/gon
210223
cat << EOF > config.json
211224
{
212225
"notarize": {
213-
"path": "build/fallout-ce.dmg",
214-
"bundle_id": "$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" build/fallout-ce.app/Contents/Info.plist)",
226+
"path": "build/Fallout Community Edition.dmg",
227+
"bundle_id": "$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" "build/RelWithDebInfo/Fallout Community Edition.app/Contents/Info.plist")",
215228
"staple": true
216229
}
217230
}
@@ -225,8 +238,8 @@ jobs:
225238
- name: Upload
226239
run: |
227240
cd build
228-
cp fallout-ce.dmg fallout-ce-macos.dmg
229-
gh release upload ${{ github.ref_name }} fallout-ce-macos.dmg
241+
cp "Fallout Community Edition.dmg" fallout-ce-macos.dmg
242+
gh release upload ${{ github.event.release.tag_name }} fallout-ce-macos.dmg
230243
rm fallout-ce-macos.dmg
231244
env:
232245
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -247,10 +260,10 @@ jobs:
247260

248261
steps:
249262
- name: Clone
250-
uses: actions/checkout@v3
263+
uses: actions/checkout@v4
251264

252265
- name: Cache cmake build
253-
uses: actions/cache@v3
266+
uses: actions/cache@v4
254267
with:
255268
path: build
256269
key: windows-${{ matrix.arch }}-cmake-v1
@@ -274,7 +287,7 @@ jobs:
274287
run: |
275288
cd build/RelWithDebInfo
276289
7z a fallout-ce-windows-${{ matrix.arch }}.zip fallout-ce.exe
277-
gh release upload ${{ github.ref_name }} fallout-ce-windows-${{ matrix.arch }}.zip
290+
gh release upload ${{ github.event.release.tag_name }} fallout-ce-windows-${{ matrix.arch }}.zip
278291
rm fallout-ce-windows-${{ matrix.arch }}.zip
279292
env:
280293
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -371,13 +371,6 @@ if(APPLE)
371371
else()
372372
install(TARGETS ${EXECUTABLE_NAME} DESTINATION .)
373373

374-
if (CPACK_BUNDLE_APPLE_CERT_APP)
375-
install(CODE "
376-
execute_process(COMMAND codesign --deep --force --options runtime --sign \"${CPACK_BUNDLE_APPLE_CERT_APP}\" ${CMAKE_BINARY_DIR}/Fallout Community Edition.app)
377-
"
378-
COMPONENT Runtime)
379-
endif()
380-
381374
set(CPACK_GENERATOR "DragNDrop")
382375
set(CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK ON)
383376
set(CPACK_PACKAGE_FILE_NAME "Fallout Community Edition")

0 commit comments

Comments
 (0)