Skip to content

Commit 2aafb6b

Browse files
committed
migrate to github action
1 parent 6bd6745 commit 2aafb6b

3 files changed

Lines changed: 123 additions & 1 deletion

File tree

.github/workflows/update.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: Update
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
branch:
7+
description: 'Steam VR Branch'
8+
required: false
9+
default: 'beta'
10+
type: string
11+
repository_dispatch:
12+
13+
concurrency:
14+
group: ${{ github.workflow }}
15+
cancel-in-progress: true
16+
17+
jobs:
18+
execute:
19+
runs-on: ubuntu-latest
20+
permissions:
21+
contents: write
22+
steps:
23+
24+
- name: Checkout GameTracking
25+
id: checkout-gametracking
26+
uses: actions/checkout@v6
27+
with:
28+
fetch-depth: 1
29+
repository: 'SteamTracking/GameTracking'
30+
31+
- name: Grab cache
32+
id: cache
33+
uses: actions/cache@v5
34+
with:
35+
path: |
36+
${{ github.workspace }}/tools/*
37+
!${{ github.workspace }}/tools/build.sh
38+
key: ${{ runner.os }}-tools-${{ steps.checkout-gametracking.outputs.commit }}
39+
40+
- name: Checkout GameTrackingSteamVR
41+
uses: actions/checkout@v6
42+
with:
43+
fetch-depth: 1
44+
path: steamvr
45+
46+
- name: Setup Go
47+
if: steps.cache.outputs.cache-hit != 'true'
48+
uses: actions/setup-go@v6
49+
with:
50+
go-version: 'stable'
51+
52+
- name: Setup .NET
53+
if: steps.cache.outputs.cache-hit != 'true'
54+
uses: actions/setup-dotnet@v5
55+
with:
56+
dotnet-version: '10.x'
57+
58+
- name: Build tools
59+
if: steps.cache.outputs.cache-hit != 'true'
60+
run: ./tools/build.sh
61+
62+
- name: Configure git user
63+
run: |
64+
git config --global user.name "github-actions[bot]"
65+
git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
66+
67+
- name: Setup Node.js
68+
uses: actions/setup-node@v6
69+
with:
70+
node-version: '22'
71+
cache: 'npm'
72+
cache-dependency-path: steamvr/package-lock.json
73+
74+
- name: Install Node dependencies
75+
working-directory: steamvr
76+
run: npm ci
77+
78+
- name: Execute
79+
working-directory: steamvr
80+
run: ./update.sh
81+
env:
82+
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
83+
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}
84+
STEAM_BRANCH: ${{ github.event.inputs.branch }}

files.json

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
{
2+
"250824": // steamvr content
3+
[
4+
"regex:.+?\\.(vdf|kv3|txt|cfg|lst|db|jpg|png|gif|svg|inf|gi|fgd|lua|json|js|ts|css|html|vrdrivermanifest|vrfirmware|vrmanifest|vrresources|vrsettings)"
5+
],
6+
"250827": // steamvr content 2
7+
[
8+
"regex:.+?\\.(vdf|kv3|txt|cfg|lst|db|jpg|png|gif|inf|gi|fgd|lua|json|js|ts|html)"
9+
],
10+
"250830": // steamvr environments content
11+
[
12+
"regex:.+?\\.(vdf|kv3|txt|cfg|lst|db|jpg|png|gif|inf|gi|fgd|lua|json|js|ts|html)",
13+
"regex:.+?asset_info\\.bin",
14+
"regex:.+?_dir\\.vpk",
15+
],
16+
"250833": // steamvr environments tools
17+
[
18+
"regex:.+?\\.(vdf|kv3|txt|cfg|lst|db|jpg|png|gif|inf|gi|fgd|lua|json|js|ts|html)",
19+
"regex:.+?asset_info\\.bin",
20+
],
21+
"250821": // steamvr windows
22+
[
23+
"regex:.+?\\.(dll|exe)",
24+
],
25+
"250823": // steamvr linux
26+
[
27+
"regex:.+?\\.(so|sh)",
28+
],
29+
"250832": // steamvr environments linux
30+
[
31+
"regex:.+?\\.(so|sh)",
32+
"regex:.+?_dir\\.vpk",
33+
],
34+
}

update.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ set -euo pipefail
44
cd "${0%/*}"
55
. ../common.sh
66

7+
echo "Downloading SteamVR..."
8+
9+
$STEAM_FILE_DOWNLOADER_PATH --username "$STEAM_USERNAME" --password "$STEAM_PASSWORD" --appid 250820 --output . --branch $STEAM_BRANCH --save-manifest
10+
711
echo "Processing SteamVR..."
812

913
ProcessDepot ".dll"
@@ -18,6 +22,6 @@ rm --recursive resources/webinterface/dashboard_prettier/ || true
1822
rsync --archive --include="*/" --include="*.js" --include="*.css" --exclude="*" --prune-empty-dirs resources/webinterface/dashboard/ resources/webinterface/dashboard_prettier/
1923
npm run prettier -- --write resources/webinterface/dashboard_prettier/ || true
2024

21-
CreateCommit "$(grep -o '[0-9\.]*' bin/version.txt)" "${1:-}"
25+
CreateCommit "$(grep -o '[0-9\.]*' bin/version.txt)" "$(grep -o '[0-9\.]*' steam_buildid.txt)"
2226

2327
echo "Done."

0 commit comments

Comments
 (0)