-
Notifications
You must be signed in to change notification settings - Fork 0
39 lines (31 loc) · 1.06 KB
/
publish.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
name: Continuous Integration
on:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: "6.0.x"
include-prerelease: true
- name: Build
run: dotnet build --configuration Release
- name: Version and Tag
id: bump_version
uses: anothrNick/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: true
- name: Prep Version String
id: name_version
run: echo ::set-output name=version::$(echo ${{ steps.bump_version.outputs.tag }} | sed 's/[v]//g')
- name: Pack
run: dotnet pack API/NWN.MasterList.csproj --configuration Release -p:PackageVersion=${{ steps.name_version.outputs.version }} -o output
- name: Publish Package
run: dotnet nuget push output/*.nupkg --api-key ${{ secrets.NUGET_KEY }} --source https://api.nuget.org/v3/index.json