-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (71 loc) · 2.13 KB
/
main.yml
File metadata and controls
77 lines (71 loc) · 2.13 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
name: Build .NET 4.8 App
permissions:
contents: write
on:
push:
branches:
- master
tags:
- "*"
pull_request:
branches:
- master
jobs:
build:
runs-on: windows-2019
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Checkout dll repo
run: git clone https://github.com/CrystalMarble/dllrepo
- name: Copy Ultra dlls
run: |
mkdir -Force ExampleMod/Libraries
copy dllrepo/ultra/* ExampleMod/Libraries/
- name: Download 0Harmony
run: |
Invoke-WebRequest "https://github.com/pardeike/Harmony/releases/download/v2.3.3.0/Harmony-Fat.2.3.3.0.zip" -OutFile ./_Harmony.zip
mkdir _Harmony
Expand-Archive -LiteralPath ./_Harmony.zip -DestinationPath ./_Harmony/
copy ./_Harmony/net48/0Harmony.dll ./ExampleMod/Libraries/
- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2
- name: Setup NuGet
uses: NuGet/setup-nuget@v2
with:
nuget-version: "latest"
- name: Build Solution
run: msbuild ./ExampleMod/ExampleMod.csproj /p:Configuration=Release
- name: Copy necessary files to release
run: |
mkdir Release
copy ./ExampleMod/bin/Release/ExampleMod.* Release/
- name: Publish Build Artifacts
if: success()
uses: actions/upload-artifact@v4
with:
name: ExampleMod
path: Release
release:
needs: build
runs-on: windows-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Download Build Artifacts
uses: actions/download-artifact@v4
with:
name: ExampleMod
path: Release
- name: ZIPs the contents
uses: TheDoctor0/zip-release@0.7.1
with:
filename: "ExampleMod.zip"
directory: Release
- name: Create Relese
uses: ncipollo/release-action@v1.10.0
with:
artifacts: "Release/*.zip"
tag: "${{ github.ref_name }}"
name: "ExampleMod-${{ github.ref_name }}"