Added Gutschrift und Storno in BElegArt Enum #393
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: Build and publish (NuGet) | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ master ] | |
paths-ignore: | |
- 'WebLibs/**' | |
- '.github/workflows/publish-weblibs.yml' | |
- '.github/workflows/check-weblibs.yml' | |
env: | |
SDK_VERSION: 6.0.x | |
PACKAGE_1: GDL.IDAS.Crypto | |
PACKAGE_1_FULL: Gandalan.IDAS.Crypto | |
PACKAGE_2: GDL.IDAS.Logging | |
PACKAGE_2_FULL: Gandalan.IDAS.Logging | |
PACKAGE_3: GDL.IDAS.WebApi.Client | |
PACKAGE_3_FULL: Gandalan.IDAS.WebApi.Client | |
PACKAGE_4: GDL.IDAS.WebApi.Client.Wpf | |
PACKAGE_4_FULL: Gandalan.IDAS.WebApi.Client.Wpf | |
PACKAGE_5: GDL.IDAS.Contracts | |
PACKAGE_5_FULL: Gandalan.IDAS.Contracts | |
BUILD_CONFIG: Release | |
OUTPUT_DIR: ./GDLPackages | |
jobs: | |
build-and-publish-nuget: | |
if: github.repository_owner == 'gandalan' | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 50 | |
- name: Setup NuGet | |
uses: NuGet/setup-nuget@v1 | |
- name: Set release_name | |
id: set_release_name | |
run: echo "release_name=$(date +'%-Y.%-m.%-d').$GITHUB_RUN_NUMBER" >> $GITHUB_OUTPUT | |
- name: Setup .NET Core SDK ${{ env.SDK_VERSION }} | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: ${{ env.SDK_VERSION }} | |
- name: Run UpdateVersionInfo.ps1 with ${{ steps.set_release_name.outputs.release_name }} | |
shell: pwsh | |
run: .\UpdateVersionInfo.ps1 ${{ steps.set_release_name.outputs.release_name }} | |
- name: Install dependencies | |
run: dotnet restore | |
- name: Build | |
run: dotnet build --configuration ${{ env.BUILD_CONFIG }} --no-restore -p:Version=${{ steps.set_release_name.outputs.release_name }} | |
- name: Create package ${{ env.PACKAGE_1 }} | |
run: nuget pack ${{ env.PACKAGE_1_FULL }}/${{ env.PACKAGE_1 }}.nuspec -NonInteractive -Verbosity Detailed -OutputDirectory ${{ env.OUTPUT_DIR }} | |
- name: Create package ${{ env.PACKAGE_2 }} | |
run: nuget pack ${{ env.PACKAGE_2_FULL }}/${{ env.PACKAGE_2 }}.nuspec -NonInteractive -Verbosity Detailed -OutputDirectory ${{ env.OUTPUT_DIR }} | |
- name: Create package ${{ env.PACKAGE_3 }} | |
run: nuget pack ${{ env.PACKAGE_3_FULL }}/${{ env.PACKAGE_3 }}.nuspec -NonInteractive -Verbosity Detailed -OutputDirectory ${{ env.OUTPUT_DIR }} | |
- name: Create package ${{ env.PACKAGE_4 }} | |
run: nuget pack ${{ env.PACKAGE_4_FULL }}/${{ env.PACKAGE_4 }}.nuspec -NonInteractive -Verbosity Detailed -OutputDirectory ${{ env.OUTPUT_DIR }} | |
- name: Create package ${{ env.PACKAGE_5 }} | |
run: nuget pack ${{ env.PACKAGE_5_FULL }}/${{ env.PACKAGE_5 }}.nuspec -NonInteractive -Verbosity Detailed -OutputDirectory ${{ env.OUTPUT_DIR }} | |
- name: Push packages | |
run: dotnet nuget push "${{ env.OUTPUT_DIR }}/*.nupkg" -k ${NUGET_TOKEN} #--skip-duplicate | |
env: | |
NUGET_TOKEN: ${{ secrets.NUGET_TOKEN }} | |
- name: Create tag | |
uses: rickstaa/action-create-tag@v1 | |
with: | |
tag: IDAS.Client.Libs-Release_${{ steps.set_release_name.outputs.release_name }} | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create release with changelog and assets | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release create "IDAS.Client.Libs-Release_${{ steps.set_release_name.outputs.release_name }}" --generate-notes --prerelease ${{ env.OUTPUT_DIR }}/*.nupkg |