Skip to content

v0.0.9

v0.0.9 #6

Workflow file for this run

name: Nuget Release
on:
release:
types: [created, edited]
jobs:
run_tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.100
- name: Build/Check for compile errors (dotnet build)
working-directory: "MaLoIdentModels"
run: dotnet build --configuration Release
- name: Run Unit Tests (dotnet test) # never ever release with failing tests!
working-directory: "MaLoIdentModels"
run: dotnet test --configuration Release
push_release:
needs: run_tests
if: startsWith(github.ref, 'refs/tags/v')
runs-on: windows-latest
env:
ACTIONS_ALLOW_UNSECURE_COMMANDS: "true"
steps:
- uses: actions/checkout@v4
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.100
- uses: olegtarasov/get-tag@v2.1
id: tagTBC
with:
tagRegex: "v(\\d+\\.\\d+\\.\\d+)"
- name: Build/Check for compile errors (dotnet build)
working-directory: "MaLoIdentModels"
run: dotnet build --configuration Release
- name: Create Package MaLoIdentModels (dotnet pack)
working-directory: "MaLoIdentModels/MaLoIdentModels"
run: dotnet pack MaLoIdentModels.csproj --configuration Release -p:PackageVersion="${{ steps.tagTBC.outputs.tag }}"
- name: Setup Nuget.exe
uses: warrenbuckley/Setup-Nuget@v1
- name: Nuget push MaLoIdentModels
working-directory: "MaLoIdentModels/MaLoIdentModels"
# token: https://github.com/Hochfrequenz/MaLoIdentModels/settings/secrets/actions/NUGET_ORG_PUSH_TOKEN
# expires 2025-09-27; token is owned by konstantin as of now.
run: |
nuget setApiKey ${{ secrets.NUGET_ORG_PUSH_TOKEN }}
nuget push .\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -NoSymbols