windows ci and cd (#21)

This commit is contained in:
extrawurst
2025-04-23 23:30:36 +02:00
committed by GitHub
parent 921cb05f96
commit 10aa7131ea
7 changed files with 136 additions and 7 deletions

View File

@@ -168,3 +168,59 @@ jobs:
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
message: New steamos release (`${{ steps.vars.outputs.branch }}`) [`${{ steps.vars.outputs.sha_short }}`]
steam-windows:
runs-on: [self-hosted, linux]
steps:
- uses: actions/checkout@v4
- uses: cargo-bins/cargo-binstall@main
- uses: extractions/setup-just@v1
- uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
components: llvm-tools-preview
targets: x86_64-pc-windows-msvc
- name: Configure Cargo (Windows)
run: |
which cargo-xwin || cargo install --locked cargo-xwin
- name: "Install and cache dependencies (Windows)"
uses: awalsh128/cache-apt-pkgs-action@latest
with:
packages: lld clang cmake ninja-build
version: 1.0
- name: Build binaries (Windows)
run: |
cargo xwin build --locked --release --target=x86_64-pc-windows-msvc
- name: Move binary
run: |
ls -lisa target/x86_64-pc-windows-msvc/release/
cp target/x86_64-pc-windows-msvc/release/hedz_reloaded.exe build/win/hedz_reloaded.exe
- uses: ./.github/actions/steamcmd
with:
config: ${{ secrets.STEAM_CONFIG_VDF_BASE64 }}
- name: Steam deploy
env:
# needs to be fully qualified path for steamcmd to find it
DEPOT: ${{ github.workspace }}/build/steamos/scripts/hz_win.vdf
STEAM_USR: ${{ secrets.STEAM_USR }}
run: |
cd build/steamos
~/Steam/steamcmd.sh +login $STEAM_USR +run_app_build $DEPOT +quit
- name: Set outputs
id: vars
run: |
echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
- name: Discord notification
uses: appleboy/discord-action@v1.2.0
with:
webhook_url: ${{ secrets.DISCORD_WEBHOOK }}
message: New windows release (`${{ steps.vars.outputs.branch }}`) [`${{ steps.vars.outputs.sha_short }}`]