1+ # Binding Simple CD - Template
2+
3+ # This template is for pure .NET bindings (no XML update) to publish NuGets to Nuget.org.
4+ # Copy this file to your repository as `.github/workflows/CD.yml` and customize the inputs below.
5+
16name : CD
7+
28on :
39 workflow_dispatch :
4- inputs :
5- publishEnabled :
6- description : " Publish to Nuget.org"
7- type : boolean
8- required : false
9- default : false
10-
11- env :
12- nugetOutputPath : ${{ 'nupkgs' }}
1310
1411jobs :
15- build_and_publish :
16- runs-on : windows-latest
17- steps :
18- - uses : actions/checkout@v4
19- - uses : actions/setup-dotnet@v4
20- with :
21- dotnet-version : 8.x
22- - uses : nuget/setup-nuget@v2
23- with :
24- nuget-version : " 6.x"
25- - name : Generate Bindings
26- id : build_bindings
27- shell : pwsh
28- run : |
29- ./Generate-Bindings.ps1
30- - name : Generate NuGet packages
31- id : build_nugets
32- shell : pwsh
33- run : |
34- ./Generate-NuGets.ps1 -revision ${{ github.run_number }} -outputfolder ${{ env.nugetOutputPath }} -debugSymbols false
35- - name : Publish NuGet
36- if : ${{ success() && github.event.inputs.publishEnabled == 'true' }}
37- env :
38- token : ${{secrets.EVERGINE_NUGETORG_TOKEN}}
39- shell : pwsh
40- run : |
41- cd ${{ env.nugetOutputPath }}
42- ls *.nupkg
43- dotnet nuget push "**/*.nupkg" --skip-duplicate --no-symbols -k "$env:token" -s https://api.nuget.org/v3/index.json
44- - name : SendGrid Mail Action
45- if : ${{ failure() }}
46- uses :
mmichailidis/[email protected] 47- with :
48- # The token for sendgrid
49- sendgrid-token : ${{ secrets.WAVE_SENDGRID_TOKEN }}
50- # List of emails separated by comma that the email will go
51- mail : ${{ secrets.EVERGINE_EMAILREPORT_LIST }}
52- # The email that will be shown as sender
53- from : ${{ secrets.EVERGINE_EMAIL }}
54- # The subject of the email
55- subject : WebGPU.Net CD build has failed
56- # Defines if it should be one email with multiple address or multiple emails with a single address
57- individual : false
58- # The body of the mail. The placeholders that can be used are $EVENT$, $ISSUE$, $ACTION$
59- text : something went wrong when building WebGPU.Net
12+ publish :
13+ if : github.event_name != 'schedule' || github.ref == 'refs/heads/master'
14+ uses : EvergineTeam/evergine-standards/.github/workflows/binding-simple-cd.yml@main
15+ with :
16+ generator-project : " WebGPUGen/WebGPUGen/WebGPUGen.csproj" # Path to your generator .csproj
17+ generator-name : " WebGPU" # Name of your generator executable
18+ binding-project : " WebGPUGen/Evergine.Bindings.WebGPU/Evergine.Bindings.WebGPU.csproj" # Path to your binding .csproj
19+ target-framework : " net8.0" # Target framework for generator/binding
20+ dotnet-version : " 8.x" # .NET SDK version
21+ nuget-version : " 6.x" # NuGet CLI version
22+ runtime-identifier : " win-x64" # Runtime identifier (win-x64, linux-x64, etc.)
23+ build-configuration : " Release" # Build configuration (Release, Debug, etc.)
24+ revision : ${{ github.run_number }} # Revision for date-based version (bindings style). Use with bindings.
25+ publish-enabled : true
26+ enable-email-notifications : true
27+ secrets :
28+ NUGET_UPLOAD_TOKEN : ${{ secrets.EVERGINE_NUGETORG_TOKEN }}
29+ WAVE_SENDGRID_TOKEN : ${{ secrets.WAVE_SENDGRID_TOKEN }}
30+ EVERGINE_EMAILREPORT_LIST : ${{ secrets.EVERGINE_EMAILREPORT_LIST }}
31+ EVERGINE_EMAIL : ${{ secrets.EVERGINE_EMAIL }}
32+
33+ # Tips:
34+ # - For direct version (add-ons style):
35+ # version: "3.4.22.288-local"
36+ # - For date-based version (bindings style):
37+ # revision: "" # Uses github.run_number or custom logic
0 commit comments