v2.0.1 #17
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: 9.0.100 | |
- name: Build/Check for compile errors (dotnet build) | |
run: dotnet build --configuration Release | |
- name: Run Unit Tests (dotnet test) # never ever release with failing tests! | |
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: 9.0.100 | |
- uses: olegtarasov/[email protected] | |
id: tagTBC | |
with: | |
tagRegex: "v(\\d+\\.\\d+\\.\\d+)" | |
- name: Build/Check for compile errors (dotnet build) | |
run: dotnet build --configuration Release | |
- name: Create Package EDILibrary (dotnet pack) | |
working-directory: "EDILibrary" | |
run: dotnet pack EDILibrary.csproj --configuration Release -p:PackageVersion="${{ steps.tagTBC.outputs.tag }}" | |
- name: Setup Nuget.exe | |
uses: warrenbuckley/Setup-Nuget@v1 | |
- name: Nuget push EDILibrary and EDILibrary.Core | |
working-directory: "EDILibrary" | |
# token: https://github.com/Hochfrequenz/EDILibrary/settings/secrets/actions/NUGET_ORG_PUSH_TOKEN | |
run: | | |
nuget setApiKey ${{ secrets.NUGET_ORG_PUSH_TOKEN }} | |
nuget push .\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -NoSymbols | |
- name: Create Package EDILibrary.Standard (dotnet pack) | |
working-directory: "EDILibraryBase" | |
run: dotnet pack EDILibrary.Standard.csproj --configuration Release -p:PackageVersion="${{ steps.tagTBC.outputs.tag }}" | |
- name: Setup Nuget.exe | |
uses: warrenbuckley/Setup-Nuget@v1 | |
- name: Nuget push EDILibrary.Standard | |
working-directory: "EDILibraryBase" | |
# token: https://github.com/Hochfrequenz/EDILibrary/settings/secrets/actions/NUGET_ORG_PUSH_TOKEN | |
run: | | |
nuget setApiKey ${{ secrets.NUGET_ORG_PUSH_TOKEN }} | |
nuget push .\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -NoSymbols | |
- name: Create Package EDIFileLoader.Core (dotnet pack) | |
working-directory: "EDIFileLoader" | |
run: dotnet pack EDIFileLoader.csproj --configuration Release -p:PackageVersion="${{ steps.tagTBC.outputs.tag }}" | |
- name: Setup Nuget.exe | |
uses: warrenbuckley/Setup-Nuget@v1 | |
- name: Nuget push EDIFileLoader.Core | |
working-directory: "EDIFileLoader" | |
# token: https://github.com/Hochfrequenz/EDILibrary/settings/secrets/actions/NUGET_ORG_PUSH_TOKEN | |
run: | | |
nuget setApiKey ${{ secrets.NUGET_ORG_PUSH_TOKEN }} | |
nuget push .\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -NoSymbols | |
- name: Create Package EDIFileLoader.Standard (dotnet pack) | |
working-directory: "EDIFileLoader.Standard" | |
run: dotnet pack EDIFileLoader.Core.csproj --configuration Release -p:PackageVersion="${{ steps.tagTBC.outputs.tag }}" | |
- name: Setup Nuget.exe | |
uses: warrenbuckley/Setup-Nuget@v1 | |
- name: Nuget push EDIFileLoader.Standard | |
working-directory: "EDIFileLoader.Standard" | |
# token: https://github.com/Hochfrequenz/EDILibrary/settings/secrets/actions/NUGET_ORG_PUSH_TOKEN | |
run: | | |
nuget setApiKey ${{ secrets.NUGET_ORG_PUSH_TOKEN }} | |
nuget push .\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -NoSymbols |