Release CD #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release CD | |
on: | |
workflow_dispatch: | |
jobs: | |
release_appimage_x64: | |
name: AppImage x64 | |
runs-on: ubuntu-20.04 | |
env: | |
ARCH: x86_64 | |
OUTPUT: Endless_Sky-${{ github.ref_name }}-x86_64.AppImage | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: Install dependencies | |
run: | | |
sudo rm /etc/apt/sources.list.d/* && sudo dpkg --clear-avail # Speed up installation and get rid of unwanted lists | |
sudo apt-get update | |
sudo apt-get install -y --no-install-recommends libxmu-dev libxi-dev libgl-dev libglu1-mesa-dev libgles2-mesa-dev libwayland-dev libxkbcommon-dev libegl1-mesa-dev | |
- name: Setup sccache | |
uses: ./.github/sccache | |
- uses: lukka/get-cmake@latest | |
- uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgGitCommitId: '2cf957350da28ad032178a974607f59f961217d9' | |
- uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: 'linux-release' | |
buildPreset: 'linux-ci-release' | |
- name: Package Application | |
run: ./utils/build_appimage.sh build/release | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.OUTPUT }} | |
path: ${{ env.OUTPUT }} | |
release_windows_x86: | |
name: Windows x86 | |
runs-on: windows-2022 | |
env: | |
OUTPUT: EndlessSky-win32-${{ github.ref_name }}.zip | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: Install x86 MinGW | |
run: choco install mingw --forcex86 --force | |
- uses: lukka/get-cmake@latest | |
- uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgGitCommitId: '2cf957350da28ad032178a974607f59f961217d9' | |
- uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: 'mingw32-release' | |
buildPreset: 'mingw32-ci-release' | |
- name: Package Application | |
run: | | |
cmake --install build/release | |
7z a ${{ env.OUTPUT }} "./install/release/*" | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.OUTPUT }} | |
path: ${{ env.OUTPUT }} | |
- name: Upload Steam Depot | |
uses: actions/upload-artifact@v3 | |
with: | |
name: steam-win32-depot | |
path: | | |
./install/release/Endless Sky.exe | |
./install/release/*.dll | |
release_windows_x64: | |
name: Windows x64 | |
runs-on: windows-2022 | |
env: | |
OUTPUT: EndlessSky-win64-${{ github.ref_name }}.zip | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: Setup sccache | |
uses: ./.github/sccache | |
- uses: lukka/get-cmake@latest | |
- uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgGitCommitId: '2cf957350da28ad032178a974607f59f961217d9' | |
- uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: 'mingw-release' | |
buildPreset: 'mingw-ci-release' | |
- name: Package Application | |
run: | | |
cmake --install build/release | |
7z a ${{ env.OUTPUT }} "./install/release/*" | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.OUTPUT }} | |
path: ${{ env.OUTPUT }} | |
- name: Upload Steam Depot | |
uses: actions/upload-artifact@v3 | |
with: | |
name: steam-win64-depot | |
path: | | |
./install/release/Endless Sky.exe | |
./install/release/*.dll | |
release_macos_universal: | |
name: MacOS Universal | |
runs-on: macos-12 | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
OUTPUT: Endless-Sky-${{ github.ref_name }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: Setup sccache | |
uses: ./.github/sccache | |
- name: Install pkg-config | |
run: type -P pkg-config || brew install pkg-config | |
- uses: lukka/get-cmake@latest | |
- uses: lukka/run-vcpkg@v11 | |
with: | |
vcpkgGitCommitId: '2cf957350da28ad032178a974607f59f961217d9' | |
- uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: 'macos-arm-release' | |
buildPreset: 'macos-arm-ci-release' | |
- name: Prepare for x64 app bundle | |
run: | | |
mv "build/release/Endless Sky.app" "Endless Sky.app.arm" | |
rm -rf build/release | |
- uses: lukka/run-cmake@v10 | |
with: | |
configurePreset: 'macos-release' | |
buildPreset: 'macos-ci-release' | |
- name: Create universal binary | |
run: | | |
mv "build/release/Endless Sky.app" "Endless Sky.app.x64" | |
cp -r "Endless Sky.app.arm" "Endless Sky.app" | |
lipo -create -output "Endless Sky.app/Contents/MacOS/Endless Sky" "Endless Sky.app.arm/Contents/MacOS/Endless Sky" "Endless Sky.app.x64/Contents/MacOS/Endless Sky" | |
for lib in "Endless Sky.app/Contents/Frameworks/"*; do lipo -create -output "$lib" "Endless Sky.app.arm/Contents/Frameworks/$(basename "$lib")" "Endless Sky.app.x64/Contents/Frameworks/$(basename "$lib")"; done | |
- name: Package Application | |
run: | | |
mkdir "${{ env.OUTPUT }}" | |
cp -r "Endless Sky.app" "${{ env.OUTPUT }}" | |
ln -s /Applications "${{ env.OUTPUT }}" | |
hdiutil create -ov -fs HFS+ -format UDZO -imagekey zlib-level=9 -srcfolder "${{ env.OUTPUT }}" "${{ github.workspace }}/${{ env.OUTPUT }}.dmg" | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.OUTPUT }}.dmg | |
path: ${{ env.OUTPUT }}.dmg | |
- name: Prepare Steam Depot | |
run: | | |
mv "Endless Sky.app/Contents/Resources/endless-sky.icns" . | |
rm -rf "Endless Sky.app/Contents/Resources" | |
mkdir "Endless Sky.app/Contents/Resources" | |
mv endless-sky.icns "Endless Sky.app/Contents/Resources" | |
mkdir depot/ | |
mv "Endless Sky.app/" depot/ | |
- name: Upload Steam Depot | |
uses: actions/upload-artifact@v3 | |
with: | |
name: steam-macos-depot | |
path: depot | |
release_steam_linux: | |
name: Steam Linux | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
arch: [x64, x86] | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: Build Endless Sky | |
run: | | |
cd steam | |
docker-compose run steam-${{ matrix.arch }} | |
- name: Prepare binary | |
run: cp build/steam-${{ matrix.arch }}/endless-sky . | |
- name: Upload Steam Depot | |
uses: actions/upload-artifact@v3 | |
with: | |
name: steam-linux${{ matrix.arch == 'x64' && '64' || '32' }}-depot | |
path: endless-sky | |
deploy_steam: | |
name: Deploy Steam | |
needs: [release_steam_linux, release_windows_x64, release_windows_x86, release_macos_universal] | |
runs-on: ubuntu-latest | |
# environment: steam | |
env: | |
data: steam-data-depot | |
linux32: steam-linux-x86 | |
linux64: steam-linux-x64 | |
win32: steam-win32 | |
win64: steam-win64 | |
macos: steam-macos | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
show-progress: false | |
- name: Upload Steam Data Depot | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ env.data }} | |
path: | | |
changelog | |
copyright | |
credits.txt | |
icon.png | |
keys.txt | |
license.txt | |
data/ | |
images/ | |
sounds/ | |
# - uses: game-ci/steam-deploy@v1 | |
# with: | |
# appId: 404410 | |
# buildDescription: canary-${{ github.sha }} | |
# username: ${{ secrets.STEAM_DEPLOY_UN }} | |
# password: ${{ secrets.STEAM_DEPLOY_PW }} | |
# configVdf: ${{ secrets.STEAM_DEPLOY_VDF }} | |
# ssfnFileName: ${{ secrets.STEAM_DEPLOY_SSFN_NAME }} | |
# ssfnFileContents: ${{ secrets.STEAM_DEPLOY_SSFN }} | |
# rootPath: '' | |
# depot1Path: ${{ env.data }} | |
# depot3Path: ${{ env.win32 }} | |
# depot4Path: ${{ env.win64 }} | |
# depot5Path: ${{ env.macos }} | |
# depot6Path: ${{ env.linux32 }} | |
# depot7Path: ${{ env.linux64 }} | |
# releaseBranch: canary |