-
Notifications
You must be signed in to change notification settings - Fork 31
53 lines (50 loc) · 1.64 KB
/
CD-dev.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
name: Development Releases
on:
push:
branches:
- "!not_activated_on_branches!*"
tags:
- "[0-9]+.[0-9]+.[0-9]+-dev.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+"
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
dotnet-version: ["6.0.x", "7.0.x","8.0.x"]
steps:
- uses: actions/checkout@v2
with:
ref: ${{ github.event.release.target_commitish }}
- name: Setup .NET Core SDK ${{ matrix.dotnet-version }}
uses: actions/setup-dotnet@v3
with:
dotnet-version: ${{ matrix.dotnet-version }}
- name: Install dependencies
run: dotnet restore Deepgram.DevBuild.sln
- name: Get the version
id: get_version
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
- name: Build
run: dotnet build Deepgram.DevBuild.sln --configuration Release --no-restore
- name: Pack
run: |
dotnet pack Deepgram.DevBuild.sln --configuration Release --no-restore --output ./dist -p:Version=${{ steps.get_version.outputs.VERSION }}
- name: Archive build artifacts
uses: actions/upload-artifact@v2
with:
name: dist
path: dist
publish:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Download build artifact
uses: actions/download-artifact@v2
with:
name: dist
path: "dist"
- name: Publish packages
run: dotnet nuget push ./dist/**.nupkg --source nuget.org --api-key ${{secrets.NUGET_API_KEY}}