-
Notifications
You must be signed in to change notification settings - Fork 7
50 lines (49 loc) · 1.79 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
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-bootstrap: true
- name: Publish on version change
id: publish_nuget
uses: bmresearch/publish-nuget@master
with:
PROJECT_FILE_PATH: BlockMountain.TradingView/BlockMountain.TradingView.csproj
PACKAGE_NAME: BlockMountain.TradingView
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 release assets
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.ACCESS_TOKEN }}
file: artifacts/BlockMountain.TradingView.dll
tag: ${{ steps.publish_nuget.outputs.VERSION }}
upload_url: ${{ steps.create_release.outputs.upload_url }}