-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (56 loc) · 1.6 KB
/
Copy pathrelease.yml
File metadata and controls
61 lines (56 loc) · 1.6 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
name: Release AET.Modinfo
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
# Builds and tests the solution.
test:
uses: ./.github/workflows/test.yml
pack:
name: Pack
needs: [test]
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v5
- name: Create packages
run: dotnet pack --configuration Release --output ./packages
- name: Upload a Build Artifact
uses: actions/upload-artifact@v6
with:
name: NuGet packages
path: packages/*.*
deploy:
name: Deploy
if: |
github.ref == 'refs/heads/master' && github.event_name == 'push'
needs: [pack]
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v5
- uses: actions/download-artifact@v7
with:
name: NuGet packages
path: packages
- name: Push packages
run: dotnet nuget push "packages/*.nupkg" --api-key ${{ secrets.NUGET_API_KEY }} --source https://api.nuget.org/v3/index.json
- uses: dotnet/nbgv@v0.4.2
id: nbgv
- name: Create GitHub release
uses: softprops/action-gh-release@v2
with:
name: v${{ steps.nbgv.outputs.SemVer2 }}
tag_name: v${{ steps.nbgv.outputs.SemVer2 }}
token: ${{ secrets.GITHUB_TOKEN }}
generate_release_notes: true