dfhack/.github/workflows/steam.yml

78 lines
2.5 KiB
YAML

2023-03-07 18:13:41 -07:00
name: Deploy to Steam
on:
workflow_dispatch:
inputs:
commit_hash:
description: Commit hash
type: string
required: true
version:
description: Version
type: string
required: true
release_channel:
description: Release channel
type: string
required: true
default: staging
2023-03-07 18:13:41 -07:00
jobs:
deploy-to-steam:
name: Deploy to Steam
runs-on: ubuntu-22.04
steps:
2023-04-30 00:31:44 -06:00
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install ccache
2023-03-07 18:13:41 -07:00
- name: Clone DFHack
uses: actions/checkout@v3
with:
submodules: true
fetch-depth: 0
ref: ${{ github.event.inputs.commit_hash }}
2023-05-18 15:06:00 -06:00
- name: Get 3rd party SDKs
uses: actions/checkout@v3
with:
repository: DFHack/3rdparty
ref: main
token: ${{ secrets.DFHACK_3RDPARTY_TOKEN }}
path: depends
2023-03-07 18:13:41 -07:00
- name: Fetch ccache
uses: actions/cache@v3
with:
path: build/win64-cross/ccache
key: ccache-win64-cross-msvc-${{ github.event.inputs.commit_hash }}
restore-keys: |
ccache-win64-cross-msvc-${{ github.event.inputs.commit_hash }}
2023-03-07 18:13:41 -07:00
ccache-win64-cross-msvc
- name: Cross-compile win64 artifacts
env:
CMAKE_EXTRA_ARGS: '-DBUILD_STONESENSE:BOOL=1 -DBUILD_DFLAUNCH:BOOL=1'
2023-04-18 20:52:57 -06:00
steam_username: ${{ secrets.STEAM_SDK_USERNAME }}
steam_password: ${{ secrets.STEAM_SDK_PASSWORD }}
2023-03-07 18:13:41 -07:00
run: |
2023-04-26 14:36:40 -06:00
echo "commit: ${{ github.event.inputs.commit_hash }}"
echo "version: ${{ github.event.inputs.version }}"
echo "release_channel: ${{ github.event.inputs.release_channel }}"
echo
2023-03-07 18:13:41 -07:00
cd build
bash -x build-win64-from-linux.sh
ccache -d win64-cross/ccache --max-size 200M
ccache -d win64-cross/ccache --cleanup
ccache -d win64-cross/ccache --show-stats
2023-03-07 18:13:41 -07:00
- name: Steam deploy
uses: game-ci/steam-deploy@v2
with:
username: ${{ secrets.STEAM_USERNAME }}
password: ${{ secrets.STEAM_PASSWORD }}
configVdf: ${{ secrets.STEAM_CONFIG_VDF}}
ssfnFileName: ${{ secrets.STEAM_SSFN_FILE_NAME }}
ssfnFileContents: ${{ secrets.STEAM_SSFN_FILE_CONTENTS }}
appId: 2346660
buildDescription: ${{ github.event.inputs.version }}
2023-03-07 18:34:44 -07:00
rootPath: build
depot1Path: win64-cross/output
2023-03-07 18:13:41 -07:00
releaseBranch: ${{ github.event.inputs.release_channel }}