-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (36 loc) · 1.02 KB
/
msbuild.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
name: MSBuild
on:
push:
tags:
- '*'
env:
SOURCE_PATH: ./Source
SOLUTION_FILE_PATH: ./Source/Avatar.csproj
OUTPUT_NAME: rimworld-avatar.zip
OUTPUT_PATH_PREFIX: Avatar
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Restore
working-directory: ${{env.GITHUB_WORKSPACE}}
run: nuget restore ${{env.SOLUTION_FILE_PATH}}
- name: Build
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild -v:m -clp:summary ${{env.SOURCE_PATH}}
- name: Packaging
working-directory: ${{env.GITHUB_WORKSPACE}}
run: >
git archive
--output ${{env.OUTPUT_NAME}}
$(for dll in $(echo 1.*/Assemblies/*.dll);
do echo --prefix ${{env.OUTPUT_PATH_PREFIX}}/$(dirname $dll)/ --add-file $dll; done)
--prefix ${{env.OUTPUT_PATH_PREFIX}}/
HEAD . ":(exclude).git*"
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: ${{env.OUTPUT_NAME}}