-
-
Notifications
You must be signed in to change notification settings - Fork 2
76 lines (64 loc) · 2.09 KB
/
release.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Release
on:
push:
branches: [ master ]
tags: [ v*.*.* ]
paths-ignore:
- '**.md'
env:
DOTNET_NOLOGO: true
DOTNET_CLI_TELEMETRY_OPTOUT: true
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
jobs:
build-artifacts:
strategy:
matrix:
project:
- VMelnalksnis.PaperlessDotNet
- VMelnalksnis.PaperlessDotNet.DependencyInjection
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/setup-dotnet@v4.0.0
- name: Publish project
id: publish
run: >
deployment/publish.sh
"${{ matrix.project }}"
"${{ github.run_number }}"
- name: Upload artifact
uses: actions/upload-artifact@v4.3.0
with:
name: ${{ steps.publish.outputs.artifact-name }}
path: ${{ steps.publish.outputs.artifact }}
- name: Upload artifact
uses: actions/upload-artifact@v4.3.0
with:
name: ${{ steps.publish.outputs.symbols-name }}
path: ${{ steps.publish.outputs.symbols }}
create-release:
name: Create release
needs: build-artifacts
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v4.1.1
id: download
with:
path: artifacts
- name: Create release
uses: softprops/action-gh-release@v0.1.15
with:
draft: true
prerelease: false
tag_name: ${{ github.ref_name }}
generate_release_notes: true
fail_on_unmatched_files: true
files: |
${{ steps.download.outputs.download-path }}/**/*.nupkg
- name: NuGet Push
run: dotnet nuget push "**/*.nupkg" --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json
working-directory: ${{ steps.download.outputs.download-path }}
- name: NuGet Push Symboles
run: dotnet nuget push "**/*.snupkg" --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json
working-directory: ${{ steps.download.outputs.download-path }}