-
Notifications
You must be signed in to change notification settings - Fork 1
52 lines (48 loc) · 1.72 KB
/
dotnet.yml
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
name: CI
on: [push]
env:
ResonitePath: "${{ github.workspace }}/Resonite"
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get Resonite Infos
run: |
{
echo "APP_INFO<<EOFEOF"
curl https://api.steamcmd.net/v1/info/2519830
echo ""
echo "EOFEOF"
} >> "$GITHUB_ENV"
- name: Get Resonite from Cache
id: cache-resonite
uses: actions/cache@v3
with:
path: "${{ env.ResonitePath }}"
key: "${{ fromJson( env.APP_INFO ).data['2519830'].depots.branches.public.buildid }}"
- name: Download Steam
if: steps.cache-resonite.outputs.cache-hit != 'true'
uses: CyberAndrii/setup-steamcmd@b786e0da44db3d817e66fa3910a9560cb28c9323
- name: Download Resonite
if: steps.cache-resonite.outputs.cache-hit != 'true'
run: |
steamcmd '+@sSteamCmdForcePlatformType windows' '+force_install_dir "${{ env.ResonitePath }}"' '+login "${{ secrets.STEAM_USER }}" "${{ secrets.STEAM_TOKEN }}"' '+app_license_request 2519830' '+app_update 2519830 validate' '+quit'
#The following line makes the cache much much smaller:
rm -r '${{ env.ResonitePath }}/RuntimeData/PreCache'
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.x'
- uses: actions/cache@v3
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj') }}
restore-keys: |
${{ runner.os }}-nuget
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build
- name: Test
run: dotnet test