-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathaction.yml
More file actions
81 lines (73 loc) · 3.08 KB
/
Copy pathaction.yml
File metadata and controls
81 lines (73 loc) · 3.08 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: Setup Resonite Build Environment
description: Setup a build environment for Resonite plugins and mods
branding:
icon: download
color: green
inputs:
resonite-path:
description: 'Path to the directory where Resonite will be installed'
required: false
default: ${{ github.workspace }}/Resonite
steam-user:
description: 'Steam username for SteamCMD. (Provide this via a secret: secrets.STEAMUSER)'
required: true
steam-password:
description: 'Steam password for SteamCMD. (Provide this via a secret: secrets.STEAMPASS)'
required: true
branch:
type: choice
description: 'Branch of Resonite to use. defaults to "public"'
required: false
default: 'public'
options:
- public
- prerelease
- headless
branch-password:
description: 'Branch password if using a protected branch. (Provide this via a secret: secrets.BRANCHPASS)'
required: false
outputs:
resonite-path:
description: 'Path to the Resonite install directory'
value: ${{ inputs.resonite-path }}
libraries-path:
description: 'Path to the Resonite Libraries directory'
value: ${{ inputs.resonite-path }}/Libraries
runs:
using: "composite"
steps:
- name: Get buildid [prerelease]
if: ${{ inputs.branch == 'prerelease' }}
shell: bash
run: |
echo "BUILD_ID=$(curl -s https://api.steamcmd.net/v1/info/2519830 | jq -r '.data["2519830"].depots.branches.prerelease.buildid')" >> $GITHUB_ENV
- name: Get buildid [public]
if: ${{ inputs.branch == 'public' || inputs.branch == 'headless' }}
shell: bash
run: |
echo "BUILD_ID=$(curl -s https://api.steamcmd.net/v1/info/2519830 | jq -r '.data["2519830"].depots.branches.public.buildid')" >> $GITHUB_ENV
- name: Fetch cached Resonite
id: cache-resonite
uses: actions/cache@v6
with:
path: ${{ inputs.resonite-path }}
key: Resonite-${{ env.BUILD_ID }}-${{ inputs.branch }} # Resonite-18898712-public
- name: Download Steamcmd
if: steps.cache-resonite.outputs.cache-hit != 'true' # only download if resonite is not cached
uses: CyberAndrii/setup-steamcmd@afc45f145b95c175c3a3862d3ca84756537d48e8 # 1.3.0
#Always 'set' beta and beta password, '-beta public' will use the default branch and steamcmd ignores -betapassword when not needed for the target branch
- name: Download Resonite
if: steps.cache-resonite.outputs.cache-hit != 'true'
shell: bash
run: |
steamcmd '+@sSteamCmdForcePlatformType windows' '+force_install_dir "${{ inputs.resonite-path }}"' '+login "${{ inputs.steam-user }}" "${{ inputs.steam-password }}"' '+app_license_request 2519830' '+app_update 2519830 -beta "${{inputs.branch}}" -betapassword "${{inputs.branch-password}}" validate' '+quit'
rm -r '${{ inputs.resonite-path }}/RuntimeData/PreCache'
- name: Setup Resonite folders
id: setup-resonite-folders
shell: bash
run: |
mkdir -p "${{ inputs.resonite-path }}/Libraries"
- name: Setup .NET
uses: actions/setup-dotnet@v5
with:
dotnet-version: 10.0.x