-
Notifications
You must be signed in to change notification settings - Fork 1
103 lines (103 loc) · 4.45 KB
/
build-release.yml
File metadata and controls
103 lines (103 loc) · 4.45 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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
name: Build Release
on:
push:
tags:
- "v*"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
lfs: true
- name: Set up .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 9.0.x
- name: Restore dependencies
run: dotnet restore
- name: Download game dependencies
uses: "Skippeh/steamfetch-action@v1.0.5"
with:
username: ${{ secrets.STEAM_USERNAME }}
password: ${{ secrets.STEAM_PASSWORD }}
dir: "${{ github.workspace }}/game_files"
os: "windows"
app: 3164500
osarch: 64
beta: alternate
files: |
regex:^Schedule I_Data/Managed/.+
- name: Create DevVars.props
uses: 1arp/create-a-file-action@0.4.5
with:
file: DevVars.props
content: |
<Project>
<PropertyGroup>
<ManagedFolder>${{ github.workspace }}/game_files/Schedule I_Data/Managed</ManagedFolder>
</PropertyGroup>
</Project>
- name: Initial build # First build doesn't copy NAudio files to dist for some reason, work around by building twice
run: dotnet build /p:BEPINEX=1 -c Release
- name: Release build (BepInEx)
run: dotnet build /p:BEPINEX=1 -c Release
- name: Release build (MelonLoader)
run: dotnet build /p:MELONLOADER=1 -c Release
- name: Extract version from RealRadio project
id: realradio_version
uses: KageKirin/get-csproj-version@v1.0.0
with:
file: RealRadio/RealRadio.csproj
- name: Create Thunderstore package (MelonLoader)
run: |
cd dist/MelonLoader
mkdir -p Thunderstore/Mods/
cp -r RealRadio Thunderstore/Mods/
cp ../../README.md Thunderstore/README.md
cp ../../.thunderstore/icon.png Thunderstore/icon.png
cp ../../.thunderstore/CHANGELOG.md Thunderstore/CHANGELOG.md
cp ../../LICENSE Thunderstore/LICENSE
- name: Create Thunderstore metadata (MelonLoader)
uses: 1arp/create-a-file-action@0.4.5
with:
file: dist/MelonLoader/Thunderstore/manifest.json
content: |
{
"name": "Real_Radio",
"description": "An immersive radio mod with positional audio that supports both live internet radio and YtDlp.",
"version_number": "${{ steps.realradio_version.outputs.version }}",
"website_url": "https://github.com/Skippeh/Schedule1RealRadioMod",
"dependencies": [
"LavaGang-MelonLoader-0.7.0"
]
}
- name: Upload artifact (MelonLoader Thunderstore)
uses: actions/upload-artifact@v4
with:
name: RealRadio (MelonLoader Thunderstore)
path: dist/MelonLoader/Thunderstore/**/*
if-no-files-found: error
- name: Create zipped mod bundle (BepInEx)
run: |
cd dist/BepInEx
mkdir -p BepInEx/plugins/
mv RealRadio BepInEx/plugins/
zip RealRadio_BepInEx.zip BepInEx -r
- name: Create zipped mod bundle (MelonLoader)
run: |
cd dist/MelonLoader
mkdir Mods
mv RealRadio Mods/
zip RealRadio_MelonLoader.zip Mods -r
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
fail_on_unmatched_files: true
files: |
dist/BepInEx/RealRadio_BepInEx.zip
dist/MelonLoader/RealRadio_MelonLoader.zip
generate_release_notes: true
target_commitish: ${{ github.sha }}
draft: true
token: ${{ secrets.GH_RELEASE_TOKEN }}