-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (60 loc) · 2.25 KB
/
submodulebuild.yml
File metadata and controls
71 lines (60 loc) · 2.25 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
name: SubmoduleBuild
on:
workflow_call:
env:
OutputDirectory: ${{ github.workspace}}/output
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Clone Repo
uses: actions/checkout@master
with:
submodules: true
repository: AbyssMod/Abyss
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: 6.0.x
- name: Build
run: dotnet build -c Release --property:OutputPath=${{ env.OutputDirectory }}
- name: Upload Nuget Package
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}.nupkg
if-no-files-found: warn
retention-days: 7
path: ${{ env.OutputDirectory }}/${{ github.event.repository.name }}*.nupkg
- name: Upload Dll
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}.dll
if-no-files-found: error
retention-days: 90
path: ${{ env.OutputDirectory }}/${{ github.event.repository.name }}.dll
- name: Upload XML
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}.xml
if-no-files-found: warn
retention-days: 7
path: ${{ env.OutputDirectory }}/${{ github.event.repository.name }}.xml
- name: Publish NuGet package
if: startsWith(github.ref, 'refs/tags/')
shell: pwsh
continue-on-error: true
run: dotnet nuget push ${{ env.OutputDirectory }}/${{ github.event.repository.name }}*.nupkg --api-key "${{ secrets.NUGET_APIKEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Release Dll
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files : true
files: |
${{ env.OutputDirectory }}/${{ github.event.repository.name }}.dll
- name: Release Xml
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1
with:
fail_on_unmatched_files : false
files: |
${{ env.OutputDirectory }}/${{ github.event.repository.name }}.xml