-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.34 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
name: Build mod
on:
pull_request:
branches: "*"
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
PROJECT_NAME: jcdcdev.Eco.Signs
PROJECT_PATH: ./src/jcdcdev.Eco.Signs/jcdcdev.Eco.Signs.csproj
BUILD_OUTPUT: ./build-output
MOD_OUTPUT: ./build-assets/Mods/jcdcdev.Eco.Signs
ASSET_NAME: jcdcdev.Eco.Signs-dev-${{ github.sha }}
ARTIFACT_OUTPUT: ./build-assets
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Download, Extract, and Copy DLLs
run: |
mkdir ./src/jcdcdev.Eco.Signs/lib
wget -O file.zip https://api.mod.io/v1/games/6/mods/2595901/files/4716764/download
unzip -d extracted_files file.zip
find extracted_files -name "*.dll" -exec cp {} ./src/jcdcdev.Eco.Signs/lib \;
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 7.0.x
- name: Build project
run: dotnet build ${{ env.PROJECT_PATH }} -o ${{ env.MOD_OUTPUT }} --configuration Release
- uses: vimtor/action-zip@v1
with:
files: ${{ env.ARTIFACT_OUTPUT }}
dest: ${{ env.ASSET_NAME }}.zip
- name: Upload package
uses: actions/upload-artifact@v2
with:
name: ${{ env.ASSET_NAME }}
path: ${{ env.ASSET_NAME }}.zip