-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (35 loc) · 1.05 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
name: Release
env:
DOTNET_CLI_TELEMETRY_OPTOUT: 1
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]+"
- "v[0-9]+.[0-9]+.[0-9]+-preview.[0-9]+"
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup .NET 6
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.x
- name: Extract release notes
run: |
git log --pretty=format:'%d %s' ${GITHUB_REF} | perl -pe 's| \(.*tag: v(\d+.\d+.\d+(-preview.[0-9]+)?)(, .*?)*\)|\n## \1\n|g' > RELEASE-NOTES
- name: Build and Test
run: ./Build.ps1
shell: pwsh
- name: Push to MyGet
run: dotnet nuget push artifacts/*.nupkg -s https://www.myget.org/F/netirc/api/v3/index.json -k ${{secrets.MYGET_TOKEN}}
- name: Push to NuGet
run: dotnet nuget push artifacts/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.NUGET_TOKEN}}
- name: Artifacts
uses: actions/upload-artifact@v2
with:
name: artifacts
path: artifacts/*