-
Notifications
You must be signed in to change notification settings - Fork 128
119 lines (118 loc) · 4.85 KB
/
publish.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
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Build, Pack & Publish
on:
push:
branches:
- master # Default release branch
- net5 # .NET5 release branch
jobs:
publish:
name: build, pack & publish
runs-on: ubuntu-latest
steps:
- name: Get the sources
uses: actions/checkout@v2
- name: Extract release notes
run: |
git log --pretty=format:'%s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview\d{3})?)(, .*?)*\)|\n## \1\n|g' > RELEASE-NOTES.txt
- name: Run the build script
uses: cake-build/cake-action@v1
with:
script-path: build.cake
target: Pack
cake-version: 1.1.0
cake-bootstrap: true
- name: Publish Solnet.Extensions on version change
uses: bmresearch/publish-nuget@master
with:
PROJECT_FILE_PATH: src/Solnet.Extensions/Solnet.Extensions.csproj
PACKAGE_NAME: Solnet.Extensions
VERSION_FILE_PATH: SharedBuildProperties.props
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$
TAG_FORMAT: v*
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
INCLUDE_SYMBOLS: true
- name: Publish Solnet.Wallet on version change
uses: bmresearch/publish-nuget@master
with:
PROJECT_FILE_PATH: src/Solnet.Wallet/Solnet.Wallet.csproj
PACKAGE_NAME: Solnet.Wallet
VERSION_FILE_PATH: SharedBuildProperties.props
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$
TAG_FORMAT: v*
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
INCLUDE_SYMBOLS: true
- name: Publish Solnet.Rpc on version change
uses: bmresearch/publish-nuget@master
with:
PROJECT_FILE_PATH: src/Solnet.Rpc/Solnet.Rpc.csproj
PACKAGE_NAME: Solnet.Rpc
VERSION_FILE_PATH: SharedBuildProperties.props
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$
TAG_FORMAT: v*
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
INCLUDE_SYMBOLS: true
- name: Publish Solnet.KeyStore on version change
uses: bmresearch/publish-nuget@master
with:
PROJECT_FILE_PATH: src/Solnet.KeyStore/Solnet.KeyStore.csproj
PACKAGE_NAME: Solnet.KeyStore
VERSION_FILE_PATH: SharedBuildProperties.props
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$
TAG_FORMAT: v*
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
INCLUDE_SYMBOLS: true
- name: Publish Solnet.Programs on version change
id: publish_nuget
uses: bmresearch/publish-nuget@master
with:
PROJECT_FILE_PATH: src/Solnet.Programs/Solnet.Programs.csproj
PACKAGE_NAME: Solnet.Programs
VERSION_FILE_PATH: SharedBuildProperties.props
VERSION_REGEX: ^\s*<Version>(.*)<\/Version>\s*$
TAG_FORMAT: v*
NUGET_KEY: ${{secrets.NUGET_API_KEY}}
INCLUDE_SYMBOLS: true
- name: Create GitHub Release
id: create_release
uses: actions/create-release@v1
with:
tag_name: ${{ steps.publish_nuget.outputs.VERSION }}
release_name: ${{ steps.publish_nuget.outputs.VERSION }}
body_path: RELEASE-NOTES.txt
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
- name: Upload Solnet.Extensions release assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACCESS_TOKEN }}
file: artifacts/Solnet.Extensions.dll
tag: ${{ steps.publish_nuget.outputs.VERSION }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
- name: Upload Solnet.Wallet release assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACCESS_TOKEN }}
file: artifacts/Solnet.Wallet.dll
tag: ${{ steps.publish_nuget.outputs.VERSION }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
- name: Upload Solnet.Rpc release assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACCESS_TOKEN }}
file: artifacts/Solnet.Rpc.dll
tag: ${{ steps.publish_nuget.outputs.VERSION }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
- name: Upload Solnet.KeyStore release assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACCESS_TOKEN }}
file: artifacts/Solnet.KeyStore.dll
tag: ${{ steps.publish_nuget.outputs.VERSION }}
upload_url: ${{ steps.create_release.outputs.upload_url }}
- name: Upload Solnet.Programs release assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACCESS_TOKEN }}
file: artifacts/Solnet.Programs.dll
tag: ${{ steps.publish_nuget.outputs.VERSION }}
upload_url: ${{ steps.create_release.outputs.upload_url }}