Skip to content

Commit 183d0be

Browse files
authored
build: add Steam workflow (#30)
1 parent f7152f2 commit 183d0be

File tree

1 file changed

+96
-0
lines changed

1 file changed

+96
-0
lines changed

.github/workflows/steam.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Release to Steam
2+
3+
on: workflow_dispatch
4+
5+
permissions:
6+
contents: write
7+
8+
jobs:
9+
fmod:
10+
name: Build FMOD
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v3
14+
with:
15+
lfs: true
16+
- uses: ./.github/actions/fmod
17+
- uses: actions/upload-artifact@v3
18+
with:
19+
name: FMOD Build
20+
path: .fmod/Build
21+
build:
22+
name: Build for ${{ matrix.targetPlatform }}
23+
needs: [ release, fmod ]
24+
runs-on: ubuntu-latest
25+
strategy:
26+
matrix:
27+
targetPlatform:
28+
- StandaloneWindows64
29+
- StandaloneLinux64
30+
- StandaloneOSX
31+
outputs:
32+
buildVersion: ${{ steps.build.outputs.buildVersion }}
33+
steps:
34+
- uses: actions/checkout@v3
35+
with:
36+
lfs: true
37+
- uses: actions/cache@v3
38+
with:
39+
path: Library
40+
key: Library-${{ matrix.targetPlatform }}
41+
restore-keys: Library-
42+
- uses: actions/download-artifact@v3
43+
with:
44+
name: FMOD Build
45+
path: .fmod/Build
46+
- uses: game-ci/unity-builder@v2
47+
env:
48+
UNITY_LICENSE: ${{ secrets.UNITY_LICENSE }}
49+
UNITY_EMAIL: ${{ secrets.UNITY_EMAIL }}
50+
UNITY_PASSWORD: ${{ secrets.UNITY_PASSWORD }}
51+
with:
52+
gitPrivateToken: ${{ secrets.PACKAGES_TOKEN }}
53+
unityVersion: 2022.3.6f1
54+
targetPlatform: ${{ matrix.targetPlatform }}
55+
versioning: Custom
56+
version: ${{ needs.release.outputs.version }}
57+
buildMethod: Editor.BuildScript.Build
58+
- name: Upload artifact
59+
uses: actions/upload-artifact@v3
60+
with:
61+
name: Build-${{ matrix.targetPlatform }}
62+
path: build/${{ matrix.targetPlatform }}
63+
deployToSteam:
64+
needs: [ build ]
65+
runs-on: ubuntu-latest
66+
steps:
67+
- name: Checkout Repository
68+
uses: actions/checkout@v3
69+
with:
70+
fetch-depth: 0
71+
- name: Download StandaloneWindows64 Artifact
72+
uses: actions/download-artifact@v3
73+
with:
74+
name: Build-StandaloneWindows64
75+
path: build/StandaloneWindows64
76+
- name: Download StandaloneLinux64 Artifact
77+
uses: actions/download-artifact@v3
78+
with:
79+
name: Build-StandaloneLinux64
80+
path: build/StandaloneLinux64
81+
- name: Download StandaloneOSX Artifact
82+
uses: actions/download-artifact@v3
83+
with:
84+
name: Build-StandaloneOSX
85+
path: build/StandaloneOSX
86+
- uses: game-ci/steam-deploy@v3
87+
with:
88+
username: ${{ secrets.STEAM_USERNAME }}
89+
configVdf: ${{ secrets.STEAM_CONFIG_VDF}}
90+
appId: ${{ secrets.STEAM_APP_ID }}
91+
buildDescription: v${{ needs.build.outputs.buildVersion }}
92+
rootPath: build
93+
depot1Path: StandaloneWindows64
94+
depot2Path: StandaloneLinux64
95+
depot3Path: StandaloneOSX
96+
releaseBranch: prerelease

0 commit comments

Comments
 (0)