CI #173
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: CI | |
on: | |
create: # when tags are created | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
Build_Windows: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Install .NET | |
uses: actions/setup-dotnet@v3 | |
with: | |
dotnet-version: 7.0.x | |
- name: Restore dependencies | |
run: dotnet restore src | |
- name: Build Project | |
run: dotnet build -c Release --no-restore src | |
- name: Build Packages | |
run: dotnet pack src/ImGui.NET -c Release --no-restore --no-build | |
- name: List Packages | |
run: ls -l bin\Release\ImGui.NET\ | |
- name: Validate Generated Code | |
if: startsWith(github.ref, 'refs/tags/') | |
shell: bash | |
run: | | |
echo "Running CodeGenerator" | |
bin/Release/CodeGenerator/net7.0/CodeGenerator.exe "src/ImGui.NET/Generated" | |
git status -s | findstr . && echo "ERROR: CodeGenerator is not executed, please execute it." && exit 1 || exit 0 | |
- name: Publish to nuget.org | |
if: startsWith(github.ref, 'refs/tags/') | |
run: dotnet nuget push bin\Release\ImGui.NET\*.nupkg -s https://api.nuget.org/v3/index.json --api-key ${{secrets.NUGET_KEY}} |