This repository has been archived by the owner on Apr 7, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 12
58 lines (47 loc) · 1.93 KB
/
main.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
56
57
58
name: Publish
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-dotnet@v1
- name: Install mono and xbuild
run: |
sudo apt-get update
sudo apt-get install -y git mono-complete mono-xbuild nuget
- name: Install NexusUploader
run: dotnet tool install -g NexusUploader
- name: Get the Release version tag
id: vars
run: echo ::set-output name=tag::$(echo ${GITHUB_REF:10})
- name: Update const string BepinEx version field
run: sed -i 's/"0.0.1"/"${{steps.vars.outputs.tag}}"/g' ValheimLib/ValheimLib.cs
- name: Update AssemblyInfo version fields
run: sed -i 's/"0.0.1"/"${{steps.vars.outputs.tag}}"/g' ValheimLib/Properties/AssemblyInfo.cs
- name: Update manifest/json version field
run: sed -i 's/"0.0.1"/"${{steps.vars.outputs.tag}}"/g' manifest.json
- name: Build and Create the package
run: xbuild ValheimLib.sln /p:Configuration=Release /p:Version=${{steps.vars.outputs.tag}} /p:DocumentationFile=../docs/ValheimLib.xml /p:OutputPath=..
- name: Zip
run: |
mkdir output
mkdir output/plugins/
mkdir output/plugins/ValheimLib
cp ValheimLib.dll output/plugins/ValheimLib
cp ./docs/ValheimLib.xml output/plugins/ValheimLib
- uses: papeloto/action-zip@v1
with:
files: output/ icon.png manifest.json README.md
dest: ValheimLib_release.zip
- name: Upload
run: |
unex upload 504 ValheimLib_release.zip -v ${{ steps.vars.outputs.tag }}
env:
UNEX_APIKEY: ${{ secrets.NEXUS_API_KEY }}
UNEX_COOKIES: ${{ secrets.NEXUS_COOKIES }}
UNEX_DEBUG: true
UNEX_FILENAME: ValheimLib
UNEX_GAME: valheim