Skip to content

v0.1.14

v0.1.14 #4

Workflow file for this run

name: Publish package
on:
release:
types: [created]
jobs:
build:
env:
BUILD_CONFIG: "Release"
SOLUTION: "Knock.net.sln"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set Version
id: set_version
uses: actions/github-script@v4
with:
script: |
const noRef = context.ref.replace('refs/tags/', '')
const noPrefix = noRef.replace('v', '')
core.setOutput('version', noPrefix)
- name: Setup NuGet
uses: NuGet/[email protected]
- name: Restore dependencies
run: nuget restore $SOLUTION
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 3.1.x
- name: Build
run: dotnet build $SOLUTION --configuration $BUILD_CONFIG -p:Version=${{steps.set_version.outputs.version}} --no-restore
- name: Publish
run: nuget push **\*.nupkg -Source 'https://api.nuget.org/v3/index.json' -ApiKey ${{secrets.NUGET_API_KEY}}