Last active
July 30, 2022 23:35
-
-
Save douglaslassance/0dedf0fa0713a74ac1db5b4896e034a5 to your computer and use it in GitHub Desktop.
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: Publish on Steam | |
on: | |
push: | |
branches: [ main ] | |
paths: | |
- 'Engine/**' | |
- 'Game/**' | |
- 'PackageGame.bat' | |
- 'PublishGame.bat' | |
- 'Steam.vdf' | |
jobs: | |
publish-on-steam: | |
name: Publish on Steam | |
runs-on: windows-latest | |
env: | |
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }} | |
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }} | |
SPACES_ACCESS_KEY: ${{ secrets.SPACES_ACCESS_KEY }} | |
SPACES_SECRET: ${{ secrets.SPACES_SECRET }} | |
SPACES_ENDPOINT: ${{ secrets.SPACES_ENDPOINT }} | |
steps: | |
- name: Checkout steamcmd | |
uses: actions/checkout@v2 | |
with: | |
repository: <github_account>/steamcmd | |
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
path: .\steamcmd | |
# Always good to verify we can login first. | |
- name: Login to Steam | |
run: | | |
$env:path = $env:path + ";$env:GITHUB_WORKSPACE\steamcmd" | |
steamcmd +login $env:STEAM_USERNAME $env:STEAM_PASSWORD +quit | |
- name: Setup MSBuild | |
uses: microsoft/setup-msbuild@v1 | |
- name: Download Rclone | |
run: | | |
Start-BitsTransfer -Source https://github.com/rclone/rclone/releases/download/v1.55.1/rclone-v1.55.1-windows-amd64.zip | |
Expand-Archive rclone-v1.55.1-windows-amd64.zip . | |
$env:path = $env:path + ";$env:GITHUB_WORKSPACE\rclone-v1.55.1-windows-amd64" | |
rclone --help | |
- name: Sparse checkout action | |
uses: snow-actions/[email protected] | |
with: | |
patterns: | | |
/* | |
!/Art/ | |
# There is 80 GB on C instead of 14 GB on the default D drive. | |
path: C:\<project_name> | |
- name: Initialize submodules | |
run: | | |
pushd C:\<project_name> | |
git rm Engine | |
git submodules update --init --recursive | |
- name: Download engine | |
run: | | |
$env:path = $env:path + ";$env:GITHUB_WORKSPACE\rclone-v1.55.1-windows-amd64" | |
rclone config create spaces s3 env_auth false access_key_id $env:SPACES_ACCESS_KEY secret_access_key $env:SPACES_SECRET endpoint $env:SPACES_ENDPOINT acl private | |
$engine_commit = (git -C:\<project_name> submodule status Engine).Split(" ")[1] | |
rclone sync spaces:/<space_name>/unreal-engine/$engine_commit C:\<project_name>\Engine --progress | |
- name: Package game | |
run: C:\<project_name>\PackageGame.bat | |
- name: Publish game | |
run: | | |
$env:path = $env:path + ";$env:GITHUB_WORKSPACE\steamcmd" | |
C:\<project_name>\PublishGame.bat |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment