-
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (46 loc) · 1.41 KB
/
build.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
53
54
55
name: Build & Release
concurrency:
group: "build"
cancel-in-progress: true
on:
push:
branches:
- main
paths-ignore:
- '**.md'
- '**.js'
- '**.ps1'
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Checkout XSO assemblies
uses: actions/checkout@v4
with:
repository: ${{ secrets.xsoRepo }}
token: ${{ secrets.repoToken }}
path: refs
- name: Setup .NET
uses: actions/setup-dotnet@v3.2.0
with:
dotnet-version: '7.0.x'
- name: Add Bepis NuGet & Restore dependencies
run: |
dotnet nuget add source https://nuget.bepinex.dev/v3/index.json
dotnet restore
- name: Build
run: dotnet build -c Release --no-restore
- name: Tag version
id: tag_version
uses: mathieudutour/github-tag-action@v6.1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
- name: Create Release
run: |
$short_sha="${{ github.sha }}".Substring(0,7)
gh release create ${{ steps.tag_version.outputs.new_tag }}-$short_sha ./builds/Release/net472/KeyboardOSC.dll ./BepInEx.cfg --title "KeyboardOSC Build $short_sha" --prerelease --notes "${{ steps.tag_version.outputs.changelog }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}