-
Notifications
You must be signed in to change notification settings - Fork 85
43 lines (41 loc) · 1.44 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
name: Release
on:
release:
types: [ published ]
permissions:
actions: write
checks: write
contents: write
deployments: read
issues: write
discussions: write
packages: write
pages: write
pull-requests: write
security-events: write
statuses: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: bhowell2/[email protected]
id: extract_version
with:
value: ${{ github.event.release.tag_name }}
index_of_str: "v"
- name: Checkout
uses: actions/checkout@v3
with:
ref: ${{ github.event.release.target_commitish }}
- name: Build
run: dotnet build -c Release Vonage/Vonage.csproj -v minimal
- name: Build Signed
run: dotnet build -c ReleaseSigned Vonage/Vonage.csproj -v minimal
- name: Pack
run: dotnet pack -c Release Vonage/Vonage.csproj -v minimal --no-build
- name: Pack Signed
run: dotnet pack -c ReleaseSigned Vonage/Vonage.csproj -v minimal --no-build
- name: NuGet Push
run: dotnet nuget push Vonage/bin/Release/Vonage.${{ steps.extract_version.outputs.substring }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}
- name: NuGet Push Signed
run: dotnet nuget push Vonage/bin/ReleaseSigned/Vonage.Signed.${{ steps.extract_version.outputs.substring }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}