-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (35 loc) · 1.11 KB
/
Copy pathdotnetcore.yml
File metadata and controls
43 lines (35 loc) · 1.11 KB
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
name: .NET Core
on:
push:
paths-ignore:
- 'README.md'
pull_request:
paths-ignore:
- 'README.md'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2.4.0
- name: Setup .NET Core SDK
uses: actions/setup-dotnet@v1.9.0
with:
dotnet-version: '6.0.x'
- name: Install Dependencies
run: dotnet restore
- name: Build (Release)
run: dotnet build --configuration Release --no-restore
# - name: Test (Release)
# run: dotnet test --configuration Release --no-build --no-restore
- name: Pack (Release)
run: dotnet pack --configuration Release --output ./nuget --no-build --no-restore
- name: Publish
if: github.event_name == 'push'
run: |
if [[ ${{github.ref}} =~ ^refs/tags/[0-9]+\.[0-9]+\.[0-9]+$ ]]
then
dotnet nuget push ./nuget/*.nupkg -s nuget.org -k ${{secrets.NUGET_TOKEN}} --skip-duplicate
else
echo "publish is only enabled by tagging with a release tag"
fi