Skip to content

Commit a48d36b

Browse files
authored
chore: add GitHub Actions pipeline (#15)
1 parent 1b0a7ae commit a48d36b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

.github/workflows/pack.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: .NET
2+
3+
on:
4+
push:
5+
branches: [ "master" ]
6+
tags: [ "*" ]
7+
pull_request:
8+
branches: [ "master" ]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v3
16+
with:
17+
fetch-depth: 0 # avoid shallow clone
18+
19+
- name: Setup .NET
20+
uses: actions/setup-dotnet@v3
21+
with:
22+
dotnet-version: 8.0.x
23+
24+
- name: Pack
25+
run: dotnet pack -c Release -o out -p:ContinuousIntegrationBuild=true
26+
27+
- name: Push
28+
run: dotnet nuget push *.nupkg -s nuget.org -k $NUGET_API_KEY
29+
if: startsWith(github.ref, 'refs/tags/') || github.ref == 'refs/heads/master'
30+
working-directory: out
31+
env:
32+
NUGET_API_KEY: ${{ secrets.NUGET_API_KEY }}

0 commit comments

Comments
 (0)