forked from Blazor-Diagrams/Blazor.Diagrams
-
Notifications
You must be signed in to change notification settings - Fork 3
48 lines (37 loc) · 1.3 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
38
39
40
41
42
43
44
45
46
47
48
name: Create release
# On push to master branch. i.e. when we merge a PR.
on:
push:
branches: [ master, VFL/WI00764279/NCN-Diagrams-Move-WTG.Blazor.Diagrams-to-nuget.org ]
tags:
- "v*"
workflow_dispatch:
env:
NUGET_DIR: '${{ github.workspace }}/nuget'
jobs:
publish-pkg:
name: Build - Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get Version
id: version
uses: battila7/get-version-action@v2
- name: Setup dotnet
uses: actions/setup-dotnet@v3
with:
dotnet-version: |
6.0.x
3.1.x
- name: Install dependencies
run: dotnet restore
- name: Build
run: dotnet build --configuration Release
- name: Pack Blazor.Diagrams
working-directory: src/Blazor.Diagrams
run: 'dotnet pack --no-restore --no-build -p:GeneratePackageOnBuild=false --configuration Release -p:PackageVersion=${{ steps.version.outputs.version-without-v }} --output ${{ env.NUGET_DIR }}'
- name: Push NuGet Package to NuGet Gallery
run: |
nuget setapikey ${{ secrets.NUGET_API_KEY }}
nuget push bin/WTG.Analyzers.${{ steps.version.outputs.version-without-v }}.nupkg -Source https://api.nuget.org/v3/index.json