chore(CI): update CI with new generator #186
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: CD | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: "Checkout Master Branch" | |
uses: actions/checkout@v4 | |
- name: Update Assembly Version | |
run: | | |
cd ./.nswag-generator | |
dotnet run --genCsModel --genCsInterface --updateVersion | |
MSG=$(dotnet run --updateVersion | grep "New version") | |
VERSION=$(echo $MSG | awk -F': ' '{print $2}') | |
echo "ReleaseVersion $VERSION" | |
echo "ReleaseVersion=$VERSION" >> $GITHUB_ENV | |
- name: Create key pair for signing the assembly | |
working-directory: src/DragonflySchema | |
run: | | |
"C:\Program Files (x86)\Microsoft SDKs\Windows\v10.0A\bin\NETFX 4.8 Tools\sn.exe" -k LadybugTools.snk | |
ls | |
shell: cmd | |
- name: Build | |
run: | | |
dotnet restore | |
dotnet build --configuration Release /nowarn:CS0472,CS0108 | |
- name: Run Unit Tests | |
working-directory: src/DragonflySchema.Tests | |
run: | | |
dotnet test --configuration Release | |
- name: Deploy | |
working-directory: src/DragonflySchema | |
run: | | |
dotnet pack --configuration Release | |
dotnet nuget push bin\Release\DragonflySchema.*.nupkg -k ${{secrets.NUGET_API_KEY}} -s https://api.nuget.org/v3/index.json |