Update release workflow
This commit is contained in:
parent
ec0685ea19
commit
aa31185b35
|
@ -17,17 +17,17 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Setup Java
|
- name: Setup Java
|
||||||
uses: actions/setup-java@v2
|
uses: actions/setup-java@v3
|
||||||
with:
|
with:
|
||||||
distribution: temurin
|
distribution: temurin
|
||||||
java-version: 11
|
java-version: 11
|
||||||
cache: gradle
|
cache: gradle
|
||||||
|
|
||||||
- name: Cache cmake build
|
- name: Cache cmake build
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: os/android/app/.cxx
|
path: os/android/app/.cxx
|
||||||
key: android-cmake-v1
|
key: android-cmake-v1
|
||||||
|
@ -51,7 +51,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cd os/android/app/build/outputs/apk/release
|
cd os/android/app/build/outputs/apk/release
|
||||||
cp app-release.apk fallout2-ce-android.apk
|
cp app-release.apk fallout2-ce-android.apk
|
||||||
gh release upload ${{ github.ref_name }} fallout2-ce-android.apk
|
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-android.apk
|
||||||
rm fallout2-ce-android.apk
|
rm fallout2-ce-android.apk
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -59,14 +59,14 @@ jobs:
|
||||||
ios:
|
ios:
|
||||||
name: iOS
|
name: iOS
|
||||||
|
|
||||||
runs-on: macos-11
|
runs-on: macos-12
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache cmake build
|
- name: Cache cmake build
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: build
|
path: build
|
||||||
key: ios-cmake-v1
|
key: ios-cmake-v1
|
||||||
|
@ -75,25 +75,31 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cmake \
|
cmake \
|
||||||
-B build \
|
-B build \
|
||||||
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
|
|
||||||
-D CMAKE_TOOLCHAIN_FILE=cmake/toolchain/ios.toolchain.cmake \
|
-D CMAKE_TOOLCHAIN_FILE=cmake/toolchain/ios.toolchain.cmake \
|
||||||
-D ENABLE_BITCODE=0 \
|
-D ENABLE_BITCODE=0 \
|
||||||
-D PLATFORM=OS64 \
|
-D PLATFORM=OS64 \
|
||||||
|
-G Xcode \
|
||||||
|
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY='' \
|
||||||
# EOL
|
# EOL
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cmake \
|
cmake \
|
||||||
--build build \
|
--build build \
|
||||||
|
--config RelWithDebInfo \
|
||||||
-j $(sysctl -n hw.physicalcpu) \
|
-j $(sysctl -n hw.physicalcpu) \
|
||||||
--target package \
|
|
||||||
# EOL
|
# EOL
|
||||||
|
|
||||||
|
- name: Pack
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cpack -C RelWithDebInfo
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
cp fallout2-ce.zip fallout2-ce-ios.ipa
|
cp fallout2-ce.ipa fallout2-ce-ios.ipa
|
||||||
gh release upload ${{ github.ref_name }} fallout2-ce-ios.ipa
|
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-ios.ipa
|
||||||
rm fallout2-ce-ios.ipa
|
rm fallout2-ce-ios.ipa
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -112,7 +118,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Dependencies (x86)
|
- name: Dependencies (x86)
|
||||||
if: matrix.arch == 'x86'
|
if: matrix.arch == 'x86'
|
||||||
|
@ -129,7 +135,7 @@ jobs:
|
||||||
sudo apt install libsdl2-dev zlib1g-dev
|
sudo apt install libsdl2-dev zlib1g-dev
|
||||||
|
|
||||||
- name: Cache cmake build
|
- name: Cache cmake build
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: build
|
path: build
|
||||||
key: linux-${{ matrix.arch }}-cmake-v1
|
key: linux-${{ matrix.arch }}-cmake-v1
|
||||||
|
@ -162,7 +168,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
tar -czvf fallout2-ce-linux-${{ matrix.arch }}.tar.gz fallout2-ce
|
tar -czvf fallout2-ce-linux-${{ matrix.arch }}.tar.gz fallout2-ce
|
||||||
gh release upload ${{ github.ref_name }} fallout2-ce-linux-${{ matrix.arch }}.tar.gz
|
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-linux-${{ matrix.arch }}.tar.gz
|
||||||
rm fallout2-ce-linux-${{ matrix.arch }}.tar.gz
|
rm fallout2-ce-linux-${{ matrix.arch }}.tar.gz
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -174,16 +180,16 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Import code signing certificates
|
- name: Import code signing certificates
|
||||||
uses: apple-actions/import-codesign-certs@v1
|
uses: apple-actions/import-codesign-certs@v2
|
||||||
with:
|
with:
|
||||||
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_FILE_BASE64 }}
|
p12-file-base64: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_FILE_BASE64 }}
|
||||||
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_PASSWORD }}
|
p12-password: ${{ secrets.APPLE_DEVELOPER_CERTIFICATE_P12_PASSWORD }}
|
||||||
|
|
||||||
- name: Cache cmake build
|
- name: Cache cmake build
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: build
|
path: build
|
||||||
key: macos-cmake-v3
|
key: macos-cmake-v3
|
||||||
|
@ -192,41 +198,44 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cmake \
|
cmake \
|
||||||
-B build \
|
-B build \
|
||||||
-D CMAKE_BUILD_TYPE=RelWithDebInfo \
|
-G Xcode \
|
||||||
-D CPACK_BUNDLE_APPLE_CERT_APP="${{ secrets.APPLE_DEVELOPER_CERTIFICATE_IDENTITY }}" \
|
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_IDENTITY="${{ secrets.APPLE_DEVELOPER_CERTIFICATE_IDENTITY }}" \
|
||||||
|
-D CMAKE_XCODE_ATTRIBUTE_CODE_SIGN_INJECT_BASE_ENTITLEMENTS="NO" \
|
||||||
|
-D CMAKE_XCODE_ATTRIBUTE_OTHER_CODE_SIGN_FLAGS="--options=runtime --timestamp" \
|
||||||
# EOL
|
# EOL
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: |
|
||||||
cmake \
|
cmake \
|
||||||
--build build \
|
--build build \
|
||||||
|
--config RelWithDebInfo \
|
||||||
-j $(sysctl -n hw.physicalcpu) \
|
-j $(sysctl -n hw.physicalcpu) \
|
||||||
--target package \
|
|
||||||
# EOL
|
# EOL
|
||||||
|
|
||||||
|
- name: Pack
|
||||||
|
run: |
|
||||||
|
cd build
|
||||||
|
cpack -C RelWithDebInfo
|
||||||
|
|
||||||
- name: Notarize
|
- name: Notarize
|
||||||
run: |
|
run: |
|
||||||
brew install mitchellh/gon/gon
|
xcrun notarytool submit \
|
||||||
cat << EOF > config.json
|
"build/Fallout II Community Edition.dmg" \
|
||||||
{
|
--apple-id "${{ secrets.APPLE_DEVELOPER_AC_USERNAME }}" \
|
||||||
"notarize": {
|
--team-id "${{ secrets.APPLE_DEVELOPER_AC_TEAM }}" \
|
||||||
"path": "build/fallout2-ce.dmg",
|
--password "${{ secrets.APPLE_DEVELOPER_AC_PASSWORD }}" \
|
||||||
"bundle_id": "$(/usr/libexec/PlistBuddy -c "Print :CFBundleIdentifier" build/fallout2-ce.app/Contents/Info.plist)",
|
--wait
|
||||||
"staple": true
|
|
||||||
}
|
- name: Staple
|
||||||
}
|
run: |
|
||||||
EOF
|
xcrun stapler staple \
|
||||||
gon config.json
|
"build/Fallout II Community Edition.dmg"
|
||||||
rm config.json
|
|
||||||
env:
|
|
||||||
AC_USERNAME: ${{ secrets.APPLE_DEVELOPER_AC_USERNAME }}
|
|
||||||
AC_PASSWORD: ${{ secrets.APPLE_DEVELOPER_AC_PASSWORD }}
|
|
||||||
|
|
||||||
- name: Upload
|
- name: Upload
|
||||||
run: |
|
run: |
|
||||||
cd build
|
cd build
|
||||||
cp fallout2-ce.dmg fallout2-ce-macos.dmg
|
cp "Fallout II Community Edition.dmg" fallout2-ce-macos.dmg
|
||||||
gh release upload ${{ github.ref_name }} fallout2-ce-macos.dmg
|
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-macos.dmg
|
||||||
rm fallout2-ce-macos.dmg
|
rm fallout2-ce-macos.dmg
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
@ -247,10 +256,10 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Clone
|
- name: Clone
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Cache cmake build
|
- name: Cache cmake build
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v4
|
||||||
with:
|
with:
|
||||||
path: build
|
path: build
|
||||||
key: windows-${{ matrix.arch }}-cmake-v1
|
key: windows-${{ matrix.arch }}-cmake-v1
|
||||||
|
@ -274,7 +283,7 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
cd build/RelWithDebInfo
|
cd build/RelWithDebInfo
|
||||||
7z a fallout2-ce-windows-${{ matrix.arch }}.zip fallout2-ce.exe
|
7z a fallout2-ce-windows-${{ matrix.arch }}.zip fallout2-ce.exe
|
||||||
gh release upload ${{ github.ref_name }} fallout2-ce-windows-${{ matrix.arch }}.zip
|
gh release upload ${{ github.event.release.tag_name }} fallout2-ce-windows-${{ matrix.arch }}.zip
|
||||||
rm fallout2-ce-windows-${{ matrix.arch }}.zip
|
rm fallout2-ce-windows-${{ matrix.arch }}.zip
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
|
@ -389,13 +389,6 @@ if(APPLE)
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${EXECUTABLE_NAME} DESTINATION .)
|
install(TARGETS ${EXECUTABLE_NAME} DESTINATION .)
|
||||||
|
|
||||||
if(CPACK_BUNDLE_APPLE_CERT_APP)
|
|
||||||
install(CODE "
|
|
||||||
execute_process(COMMAND codesign --deep --force --options runtime --sign \"${CPACK_BUNDLE_APPLE_CERT_APP}\" ${CMAKE_BINARY_DIR}/Fallout II Community Edition.app)
|
|
||||||
"
|
|
||||||
COMPONENT Runtime)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
set(CPACK_GENERATOR "DragNDrop")
|
set(CPACK_GENERATOR "DragNDrop")
|
||||||
set(CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK ON)
|
set(CPACK_DMG_DISABLE_APPLICATIONS_SYMLINK ON)
|
||||||
set(CPACK_PACKAGE_FILE_NAME "Fallout II Community Edition")
|
set(CPACK_PACKAGE_FILE_NAME "Fallout II Community Edition")
|
||||||
|
|
Loading…
Reference in New Issue