Skip to content

Commit 8211ef4

Browse files
committed
actions refactor & updates
1 parent 21eae57 commit 8211ef4

3 files changed

Lines changed: 50 additions & 70 deletions

File tree

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build, Test, Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
defaults:
12+
run:
13+
working-directory: src
14+
15+
jobs:
16+
build-test-publish:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- uses: actions/checkout@v5
20+
- name: Setup .NET
21+
uses: actions/setup-dotnet@v5
22+
with:
23+
dotnet-version: |
24+
8.0.x
25+
9.0.x
26+
27+
- name: Restore dependencies
28+
run: dotnet restore
29+
30+
- name: Build
31+
run: dotnet build -c Release --no-restore
32+
33+
- name: Run Tests
34+
run: dotnet test -c Release --no-restore --no-build -v normal
35+
36+
- name: Pack NuGet Package(s)
37+
run: dotnet pack -c Release --no-restore --no-build --output ~/nuget-packages
38+
39+
- name: Upload Build Artifact(s)
40+
uses: actions/upload-artifact@v4
41+
with:
42+
name: nuget-packages
43+
path: ~/nuget-packages
44+
45+
- name: Push NuGet Package(s)
46+
run: |
47+
dotnet nuget push ~/nuget-packages/*.nupkg \
48+
--source https://api.nuget.org/v3/index.json \
49+
--api-key ${{ secrets.NUGET_API_KEY }} \
50+
--skip-duplicate

.github/workflows/nuget_push.yml

Lines changed: 0 additions & 36 deletions
This file was deleted.

.github/workflows/tests.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

0 commit comments

Comments
 (0)