Skip to content

Commit 402a303

Browse files
committed
ci: Github action to build and publish to steam and artifacts
1 parent 28ae2bf commit 402a303

1 file changed

Lines changed: 54 additions & 0 deletions

File tree

.github/workflows/publish.yml

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
name: Steam Publish
2+
3+
on:
4+
push:
5+
branches: [ master ]
6+
workflow_dispatch:
7+
8+
jobs:
9+
build-and-publish:
10+
runs-on: windows-latest
11+
steps:
12+
- name: Checkout code
13+
uses: actions/checkout@v3
14+
15+
- name: Setup .NET
16+
uses: actions/setup-dotnet@v3
17+
with:
18+
dotnet-version: '7.0.x'
19+
20+
- name: Restore dependencies
21+
run: dotnet restore
22+
23+
- name: Build
24+
run: dotnet build --configuration Release --no-restore /p:EnableWindowsTargeting=true
25+
26+
- name: Publish
27+
run: dotnet publish --configuration Release --output ./publish /p:EnableWindowsTargeting=true
28+
29+
- name: Package build as ZIP
30+
shell: pwsh
31+
run: Compress-Archive -Path publish\* -DestinationPath build.zip
32+
33+
- name: Upload build artifact
34+
uses: actions/upload-artifact@v4
35+
with:
36+
name: build-${{ github.sha }}
37+
path: build.zip
38+
39+
- name: Get version
40+
id: package_version
41+
uses: KageKirin/get-csproj-version@v1.0.0
42+
with:
43+
file: VRCFaceTracking/VRCFaceTracking.csproj
44+
xpath: //PropertyGroup/AssemblyVersion
45+
regex: '^(?<major>0|[1-9]\d*)\.(?<minor>0|[1-9]\d*)\.(?<patch>0|[1-9]\d*)\.(?<build>0|[1-9]\d*)$'
46+
47+
- uses: wilg/steam-deploy@steam-fix-windows
48+
with:
49+
username: ${{ secrets.STEAM_USERNAME }}
50+
configVdf: ${{ secrets.STEAM_CONFIG_VDF}}
51+
appId: 3329480
52+
buildDescription: ${{ steps.package_version.outputs.version }}
53+
depot1Path: publish
54+
releaseBranch: development

0 commit comments

Comments
 (0)