-
Notifications
You must be signed in to change notification settings - Fork 17
42 lines (31 loc) · 1.32 KB
/
releaseV2.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: Publish to NuGet
on:
release:
types: [published]
workflow_dispatch:
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v3
with:
dotnet-version: '6.0'
- name: Get version from release
id: get_version
run: echo "##[set-output name=VERSION;]${{ github.event.release.tag_name }}"
- name: Set version in .csproj
run: |
sed -i 's/<Version>.*<\/Version>/<Version>${{ steps.get_version.outputs.VERSION }}<\/Version>/g' **/*.csproj
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release --no-restore
- name: Run tests
run: dotnet test --no-restore --verbosity normal --filter "FullyQualifiedName!=Tests.Edit.SignTests.Sign_RequestSignature_ShouldProccessOk&FullyQualifiedName!=Tests.Edit.SignTests.Sign_ComplexTest_ShouldProcessOk"
- name: Pack the project
run: dotnet pack --configuration Release ./src/ILovePDF/iLovePDF.csproj --output ./nupkg
- name: Publish to NuGet
run: dotnet nuget push "*src/**/*.nupkg" --api-key ${{ secrets.NUGET_TOKEN }} --source https://api.nuget.org/v3/index.json