1- name : Steam Publish
1+ name : Steam Publish
22on :
33 push :
4- branches : [ master ]
5- pull_request :
4+ branches :
5+ - master
6+ - ' refactor/avalonia'
67 workflow_dispatch :
78
89jobs :
9- build :
10- runs-on : windows-latest
11- outputs :
12- version : ${{ steps.package_version.outputs.version }}
10+ build-and-deploy :
11+ runs-on : ubuntu-latest
1312 steps :
1413 - name : Checkout code
1514 uses : actions/checkout@v3
1615
17- - name : Install Crowdin CLI
18- run : npm install -g @crowdin/cli
16+ # - name: Install Crowdin CLI
17+ # run: npm install -g @crowdin/cli
1918
20- - name : Download latest translations
21- run : crowdin download
22- env :
23- CROWDIN_PERSONAL_TOKEN : ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
19+ # - name: Download latest translations
20+ # run: crowdin download
21+ # env:
22+ # CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
2423
2524 - name : Setup .NET
2625 uses : actions/setup-dotnet@v3
@@ -30,17 +29,23 @@ jobs:
3029 - name : Restore dependencies
3130 run : dotnet restore
3231
33- - name : Build
34- run : dotnet build --configuration Release --no-restore /p:EnableWindowsTargeting=true
32+ - name : Publish Windows (x64)
33+ run : dotnet publish VRCFaceTracking/VRCFaceTracking.csproj --configuration Release -r win-x64 --self-contained false --output ./publish/windows
34+
35+ - name : Publish Linux (x64)
36+ run : dotnet publish VRCFaceTracking/VRCFaceTracking.csproj --configuration Release -r linux-x64 --self-contained false --output ./publish/linux
3537
36- - name : Publish
37- run : dotnet publish --configuration Release --output ./publish /p:EnableWindowsTargeting=true
38+ - name : Upload Windows artifact
39+ uses : actions/upload-artifact@v4
40+ with :
41+ name : publish-windows
42+ path : publish/windows/**
3843
39- - name : Upload publish folder
44+ - name : Upload Linux artifact
4045 uses : actions/upload-artifact@v4
4146 with :
42- name : publish-folder
43- path : publish/**
47+ name : publish-linux
48+ path : publish/linux/ **
4449
4550 - name : Get version
4651 id : package_version
@@ -49,28 +54,30 @@ jobs:
4954 file : Directory.Build.props
5055 xpath : //PropertyGroup/AssemblyVersion
5156 regex : ' ^(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*)\.(?<build>0|[1-9]\d*)$'
52-
53- deploy :
54- if : github.event_name == 'push'
55- runs-on : ubuntu-latest
56- needs : build
57- steps :
58- - name : Download build artifact
59- uses : actions/download-artifact@v4
60- with :
61- name : publish-folder
62- path : publish
57+
58+ - name : Determine Steam branch
59+ id : steam_branch
60+ run : |
61+ REF_NAME="${{ github.ref_name }}"
62+ if [ "$REF_NAME" = "master" ]; then
63+ BRANCH="development"
64+ else
65+ BRANCH="${REF_NAME##*/}"
66+ fi
67+ echo "branch=$BRANCH" >> "$GITHUB_OUTPUT"
68+ echo "Publishing to Steam branch: $BRANCH"
6369
6470 - name : Deploy to Steam
71+ if : github.event_name == 'push'
6572 env :
6673 steam_username : ${{ secrets.STEAM_USERNAME }}
6774 steam_config_vdf : ${{ secrets.STEAM_CONFIG_VDF }}
68- if : ${{ env.steam_username != '' && env.steam_config_vdf != '' }}
6975 uses : game-ci/steam-deploy@v3
7076 with :
7177 username : ${{ secrets.STEAM_USERNAME }}
7278 configVdf : ${{ secrets.STEAM_CONFIG_VDF }}
7379 appId : 3329480
74- buildDescription : ${{ needs.build.outputs.version }}
75- depot1Path : publish
76- releaseBranch : development
80+ buildDescription : ${{ steps.package_version.outputs.version }}
81+ depot1Path : publish/windows
82+ depot2Path : publish/linux
83+ releaseBranch : ${{ steps.steam_branch.outputs.branch }}
0 commit comments