-
Notifications
You must be signed in to change notification settings - Fork 0
69 lines (58 loc) · 2.09 KB
/
publish_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
name: Publish a Release
on:
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 5.0.x
- name: Pack core nugets
run: dotnet pack MarkusSecundus.YoowzxCalc -o ./nugets/core
- name: Pack all nugets
run: dotnet pack -o ./nugets/all
- name: Publish demo calculator
run: dotnet publish MarkusSecundus.YoowzxCalc.Cmd -o ./publishes/demo-calculator
- name: Publish demo calculator (self contained win86)
run: dotnet publish MarkusSecundus.YoowzxCalc.Cmd -o ./publishes/demo-calculator-sc-win86 -r win-x86 --self-contained
- name: Zip core nugets
uses: papeloto/action-zip@v1
with:
files: ./nugets/core
dest: zips/nugets-core.zip
- name: Zip all nugets
uses: papeloto/action-zip@v1
with:
files: ./nugets/all
dest: zips/nugets-all.zip
- name: Zip calc demo
uses: papeloto/action-zip@v1
with:
files: ./publishes/demo-calculator
dest: zips/demo-calculator.zip
- name: Zip calc demo sc win86
uses: papeloto/action-zip@v1
with:
files: ./publishes/demo-calculator-sc-win86
dest: zips/demo-calculator--self-contained-win-x86.zip
- id: version_name
uses: QwerMike/xpath-action@v1
with:
filename: 'Directory.Build.props'
expression: '//Project/PropertyGroup/Version/text()'
- name: Github Release
uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "v${{ steps.version_name.outputs.result }}"
prerelease: false
files: |
zips/nugets-core.zip
zips/nugets-all.zip
zips/demo-calculator.zip
zips/demo-calculator--self-contained-win-x86.zip
- name: Publish to Nuget
run: dotnet nuget push "./nugets/core/*.nupkg" -s "nuget.org" -k "${{ secrets.NUGET_TOKEN }}" --skip-duplicate