-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (39 loc) · 1.27 KB
/
dotnetcore.yml
File metadata and controls
50 lines (39 loc) · 1.27 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
44
45
46
47
48
49
50
name: "Build and publish Nuget package"
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
env:
NETCORE_VERSION: '10.0.x'
PRIVATE_NUGET_PATH: 'https://nuget.pkg.github.com/bigbadjock/index.json'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup .NET Core ${{ env.NETCORE_VERSION }}
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{ env.NETCORE_VERSION }}
source-url: ${{ env.PRIVATE_NUGET_PATH }}
env:
NUGET_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Restore
run: dotnet restore ./SilverCodeAPI.sln
- name: Build
run: dotnet build ./SilverCodeAPI.sln --configuration Release --no-restore
- name: Pack
run: dotnet pack ./SilverCodeAPI.sln --configuration Release -o finalpackage --no-build
- name: Publish
uses: actions/upload-artifact@v4.0.0
with:
name: REST-Parser
path: finalpackage
- name: Push Nupkg to GitHub Packages
uses: tanaka-takayoshi/nuget-publish-to-github-packages-action@v2.1
with:
nupkg-path: './finalpackage/*.nupkg'
repo-owner: bigbadjock
gh-user: bigbadjock
token: ${{secrets.GITHUB_TOKEN}}