-
Notifications
You must be signed in to change notification settings - Fork 0
35 lines (26 loc) · 819 Bytes
/
main.yml
File metadata and controls
35 lines (26 loc) · 819 Bytes
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
name: CI
on:
workflow_dispatch:
inputs:
PackageVersion:
description: 'The version of the package to push to NuGet'
required: true
jobs:
build:
env:
BUILD_CONFIG: 'Release'
SOLUTION: 'src/SSR.Net/SSR.Net.csproj'
BUILD_VERSION: "${{ github.event.inputs.PackageVersion }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup NuGet
uses: NuGet/setup-nuget@v1.0.5
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 9.0.x
- name: Build
run: dotnet pack $SOLUTION --configuration $BUILD_CONFIG /p:Version=$BUILD_VERSION
- name: Publish
run: dotnet nuget push **\*.nupkg --source 'https://api.nuget.org/v3/index.json' --api-key ${{secrets.NUGET_API_KEY}}