-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (51 loc) · 1.42 KB
/
build.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
name: Vertiq.BTool
on:
push:
branches: [master, main]
tags: [v*]
pull_request:
branches: [master, main]
workflow_dispatch:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-latest, ubuntu-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Fetch all history for all tags and branches
run: |
git fetch --prune --unshallow
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Build
run: dotnet run --project build/build.csproj pack
- uses: actions/upload-artifact@v2
if: runner.os == 'Windows' && startsWith(github.ref, 'refs/tags/v')
with:
name: nuget
path: artifacts/nuget/
deploy-packages:
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/v')
needs: [build]
steps:
- uses: actions/checkout@v2
- name: Fetch all history for all tags and branches
run: |
git fetch --prune --unshallow
- uses: actions/download-artifact@v2
with:
name: nuget
path: artifacts/nuget/
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 8.0.x
- name: Publish to nuget.org
run: dotnet run --project build/build.csproj deploy
env:
NUGET_AUTH_TOKEN: ${{secrets.NUGET_API_KEY}}