Skip to content

Commit

Permalink
0.3.7.826
Browse files Browse the repository at this point in the history
  • Loading branch information
gleblebedev committed Jul 27, 2024
1 parent 5d6500b commit 3b72270
Show file tree
Hide file tree
Showing 4 changed files with 128 additions and 3 deletions.
4 changes: 2 additions & 2 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"isRoot": true,
"tools": {
"ezpipeline": {
"version": "0.0.45",
"version": "0.0.46",
"commands": [
"ezpipeline"
]
},
"unofficial.Urho3DNet.Editor": {
"version": "0.3.7.823",
"version": "0.3.7.826",
"commands": [
"rbfx"
]
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/build-master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,15 @@ jobs:
echo "HAS_PLAY_KEYSTORE=false" >> $GITHUB_ENV
fi
- name: Output STEAM_USERNAME to env
run: |
echo "STEAM_USERNAME=${{ secrets.STEAM_USERNAME }}" >> $GITHUB_ENV
outputs:
BUILD_VERSION: ${{ env.BUILD_VERSION }}
ANDROID_VERSION: ${{ env.ANDROID_VERSION }}
HAS_PLAY_KEYSTORE: ${{ env.HAS_PLAY_KEYSTORE }}
STEAM_USERNAME: ${{ env.STEAM_USERNAME }}

# ---------------------------------------------------------------------------------------
tests:
Expand Down Expand Up @@ -140,6 +145,7 @@ jobs:
tag_name: v${{ needs.set_version.outputs.BUILD_VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}

# ------------ itch.io ------------
- name: Release to itch.io ${{ vars.ITCH_PROJECT }}
env:
BUTLER_API_KEY: ${{ secrets.BUTLER_API_KEY }}
Expand All @@ -148,6 +154,7 @@ jobs:
dotnet tool run ezpipeline -- fetch-tool --name Butler -o tools/itch
tools/itch/butler push RbfxTemplate.Desktop/bin/Release/net8.0/${{ env.RUNTIME_ID }}/publish/ ${{ vars.ITCH_PROJECT }}:${{ env.RUNTIME_ID }}
shell: bash

# ---------------------------------------------------------------------------------------
build_android:
needs: [set_version, tests]
Expand Down Expand Up @@ -297,3 +304,68 @@ jobs:
name: v${{ needs.set_version.outputs.BUILD_VERSION }}
tag_name: v${{ needs.set_version.outputs.BUILD_VERSION }}
token: ${{ secrets.GITHUB_TOKEN }}

# ------------ Steam ------------
publish_to_steam:
needs: [set_version, build_desktop]
runs-on: ubuntu-latest
steps:
- name: Check if Steam user name is set
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: ${{ env.STEAM_USERNAME == '' }}
run: |
echo "Steam user name is not set"
gh run cancel ${{ github.run_id }}
- name: Download Windows Build
uses: robinraju/release-downloader@v1
with:
repository: ${{ github.repository }}
tag: v${{ needs.set_version.outputs.BUILD_VERSION }}
fileName: 'RbfxTemplate.win-x64.zip'
token: ${{ secrets.GITHUB_TOKEN }}
out-file-path: ./StandaloneWindows64
extract: true

- name: Download Linux Build
uses: robinraju/release-downloader@v1
with:
repository: ${{ github.repository }}
tag: v${{ needs.set_version.outputs.BUILD_VERSION }}
fileName: 'RbfxTemplate.linux-x64.zip'
token: ${{ secrets.GITHUB_TOKEN }}
out-file-path: ./StandaloneLinux64
extract: true

- name: Download Mac Build
uses: robinraju/release-downloader@v1
with:
repository: ${{ github.repository }}
tag: v${{ needs.set_version.outputs.BUILD_VERSION }}
fileName: 'RbfxTemplate.osx-x64.zip'
token: ${{ secrets.GITHUB_TOKEN }}
out-file-path: ./StandaloneMac64
extract: true

- name: Delete RbfxTemplate.*-x64.zip
run: |
ROOT_FOLDER="./"
PATTERN="*RbfxTemplate.*-x64.zip"
find "$ROOT_FOLDER" -type f -name "$PATTERN" -exec rm -f {} +
- uses: game-ci/steam-deploy@v3
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
name: Steam - Publish
with:
username: ${{ secrets.STEAM_USERNAME }}
configVdf: ${{ secrets.STEAM_CONFIG_VDF }}
appId: ${{ secrets.STEAM_APPID }}
buildDescription: v${{ needs.set_version.outputs.BUILD_VERSION }}
rootPath: ./
depot1Path: StandaloneWindows64
depot2Path: StandaloneLinux64
depot3Path: StandaloneMac64
releaseBranch: prerelease
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Urho3DNetVersion>0.3.7.823</Urho3DNetVersion>
<Urho3DNetVersion>0.3.7.826</Urho3DNetVersion>
</PropertyGroup>
</Project>
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,59 @@ Add new variable **ITCH_PROJECT** to the itch.io project id like [rebelfork/rbf

That's it! Your GitHub Actions workflow will now build your game and make it available for download via GitHub Releases. Optionally, it can also publish to itch.io if configured.

## Optional: Steam Publishing

This action assumes you are registered as a [partner](https://partner.steamgames.com/) with Steam.

One way of publishing the app would be to download zip files for *.Desktop.* builds and manually upload them to relevant depots. The rest of this readme is dedicated to publish automation via Github Action.

### Set STEAM_APPID and STEAM_USERNAME action secret

Set STEAM_USERNAME to the builder's user name.

Set STEAM_APPID to the application or demo id.

### Create "prerelease" branch

You need to create a "prerelease" branch in the **App Data Admin**. Go to SteamPipe/Builds menu and click **Create new branch**.

The reason for this is that Steam doesn't allow to make default branch live automatically and the Github Action for Steam publication will fail to do so.

### Depots

The Github Action deploys into 3 depots:

- Depot 1: Operating System : Windows, Architecture : 64-bit OS Only
- Depot 2: Operating System : Linux + SteamOS, Architecture : 64-bit OS Only
- Depot 3: Operating System : macOS, Architecture : 64-bit OS Only

If either of these depots missing the publish_to_steam job will fail.

Once you are done defining your depots, **publish the changes** that you have made from the [Publish](https://partner.steamgames.com/apps/publishing) page. If you try to run Github Action before publishing the depots the action will fail to publish binaries.

### Create a Steam Build Account

Create a specialised builder account that only has access to `Edit App Metadata` and `Publish App Changes To Steam`,
and permissions to edit your specific app.

https://partner.steamgames.com/doc/sdk/uploading#Build_Account

### Set STEAM_CONFIG_VDF action secret

Deploying to Steam requires using Multi-Factor Authentication (MFA) through Steam Guard unless `totp` is passed.
This means that simply using username and password isn't enough to authenticate with Steam.
However, it is possible to go through the MFA process only once by setting up GitHub Secrets for `configVdf` with these steps:
1. Install [Valve's offical steamcmd](https://partner.steamgames.com/doc/sdk/uploading#1) on your local machine. All following steps will also be done on your local machine. [Downloading_SteamCMD](https://developer.valvesoftware.com/wiki/SteamCMD#Downloading_SteamCMD)
1. Try to login with `steamcmd +login <username> <password> +quit`, which may prompt for the MFA code. If so, type in the MFA code that was emailed to your builder account's email address.
1. Validate that the MFA process is complete by running `steamcmd +login <username> +quit` again. It should not ask for the MFA code again.
1. The folder from which you run `steamcmd` will now contain an updated `config/config.vdf` file.
1. Windows: Use certutil to convert config.vdf content to base64 encoded string ```certutil -encodehex -f config/config.vdf config_base64.txt 0x40000001 1>nul```
1. Linux/MacOS: Use ```cat config/config.vdf | base64 > config_base64.txt``` to encode the file.
1. Copy the contents of `config_base64.txt` to a GitHub Secret `STEAM_CONFIG_VDF`.
1. `If:` when running the action you recieve another MFA code via email, run `steamcmd +set_steam_guard_code <code>` on your local machine and repeat the `config.vdf` encoding and replace secret `STEAM_CONFIG_VDF` with its contents.

More documentation on steam publishing could be found at https://github.com/game-ci/steam-deploy

## Optional: Google Play Publishing

To publish app to Google Play directly from the GitHub Action you need to define several secrets in the pipeline.
Expand Down

0 comments on commit 3b72270

Please sign in to comment.