Skip to content

Merge pull request #92 from mpewsey/fix #18

Merge pull request #92 from mpewsey/fix

Merge pull request #92 from mpewsey/fix #18

Workflow file for this run

name: Publish
on:
push:
tags:
- "v[0-9]+.[0-9]+.[0-9]*"
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: 6.0.x
- name: Restore dependencies
run: dotnet restore ".\src"
- name: Build
run: dotnet build ".\src" --configuration Release --no-restore
- name: Test
run: dotnet test ".\src" --no-restore --verbosity normal
- name: Set Version from Tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\/v/}" >> $GITHUB_ENV
- name: Pack
run: dotnet pack ./src/ManiaMap/ManiaMap.csproj --configuration Release --output out
- name: Push
run: dotnet nuget push ./out/MPewsey.ManiaMap.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${GITHUB_TOKEN}
env:
GITHUB_TOKEN: ${{ secrets.NUGET_API_KEY }}