Skip to content

Validate profile names with a platform independent character set #17

Validate profile names with a platform independent character set

Validate profile names with a platform independent character set #17

Workflow file for this run

name: Publish NuGet Package
on:
push:
tags:
- "[0-9]+.[0-9]+.[0-9]+*"
permissions:
contents: read
concurrency:
group: publish-nuget-${{ github.ref }}
cancel-in-progress: false
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Checkout
uses: actions/checkout@v6
- uses: actions/setup-dotnet@v5
with:
dotnet-version: '10.0.x'
cache: true
cache-dependency-path: 'src/**/packages.lock.json'
- name: Verify commit exists in origin/main
run: |
git fetch --no-tags --prune --depth=1 origin +refs/heads/*:refs/remotes/origin/*
git branch --remote --contains | grep origin/main
- name: Set VERSION variable from tag
run: echo "VERSION=${GITHUB_REF/refs\/tags\//}" >> $GITHUB_ENV
- name: Build
working-directory: ./src
run: dotnet build DeckSurf.SDK.sln --configuration Release /p:Version=${VERSION}
- name: Test
working-directory: ./src
run: dotnet test DeckSurf.SDK.Tests/DeckSurf.SDK.Tests.csproj --configuration Release --no-build
- name: Pack
working-directory: ./src/DeckSurf.SDK
run: dotnet pack --configuration Release /p:Version=${VERSION} --no-build --include-symbols --output .
- name: Upload Package Artifacts
uses: actions/upload-artifact@v7
with:
name: nuget-packages
path: |
src/DeckSurf.SDK/*.nupkg
src/DeckSurf.SDK/*.snupkg
- name: Push
working-directory: ./src/DeckSurf.SDK
run: dotnet nuget push DeckSurf.SDK.${VERSION}.nupkg --source https://api.nuget.org/v3/index.json --api-key ${{ secrets.NUGET_API_KEY }} --skip-duplicate