-
Notifications
You must be signed in to change notification settings - Fork 85
57 lines (55 loc) · 2.28 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
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:
- name: Define project file
uses: haya14busa/action-cond@v1
id: project_file
with:
cond: ${{ contains(github.event.release.target_commitish, 'release/video/') }}
if_true: "Vonage.Server.csproj"
if_false: "Vonage.csproj"
- name: Define project folder
uses: haya14busa/action-cond@v1
id: project_folder
with:
cond: ${{ contains(github.event.release.target_commitish, 'release/video/') }}
if_true: "Vonage.Server"
if_false: "Vonage"
- 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 ${{ steps.project_folder.outputs.value }}/${{ steps.project_file.outputs.value }} -v minimal
- name: Build Signed
run: dotnet build -c ReleaseSigned ${{ steps.project_folder.outputs.value }}/${{ steps.project_file.outputs.value }} -v minimal
- name: Pack
run: dotnet pack -c Release ${{ steps.project_folder.outputs.value }}/${{ steps.project_file.outputs.value }} -v minimal --no-build
- name: Pack Signed
run: dotnet pack -c ReleaseSigned ${{ steps.project_folder.outputs.value }}/${{ steps.project_file.outputs.value }} -v minimal --no-build
- name: NuGet Push
run: dotnet nuget push ${{ steps.project_folder.outputs.value }}/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 ${{ steps.project_folder.outputs.value }}/bin/ReleaseSigned/Vonage.Signed.${{ steps.extract_version.outputs.substring }}.nupkg -s https://api.nuget.org/v3/index.json -k ${{ secrets.NUGET_API_KEY }}