Skip to content

Commit 510c679

Browse files
committed
Sync standards initialization
1 parent e13b37f commit 510c679

File tree

14 files changed

+458
-295
lines changed

14 files changed

+458
-295
lines changed

.github/workflows/CD.yml

Lines changed: 32 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,37 @@
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+
16
name: CD
7+
28
on:
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

1411
jobs:
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-
run: powershell ./Generate-Bindings.ps1
28-
- name: Generate NuGet packages
29-
id: build_nugets
30-
run: powershell ./Generate-NuGets.ps1 -revision ${{ github.run_number }} -outputfolder ${{ env.nugetOutputPath }}
31-
- name: Publish NuGet
32-
if: ${{ success() && github.event.inputs.publishEnabled == 'true' }}
33-
env:
34-
token: ${{secrets.EVERGINE_NUGETORG_TOKEN}}
35-
run: |
36-
cd ${{ env.nugetOutputPath }}
37-
ls *.nupkg
38-
dotnet nuget push "**/*.nupkg" --skip-duplicate --no-symbols -k "$env:token" -s https://api.nuget.org/v3/index.json
39-
- name: SendGrid Mail Action
40-
if: ${{ failure() }}
41-
uses: mmichailidis/sendgrid-mail-action@v1.1
42-
with:
43-
# The token for sendgrid
44-
sendgrid-token: ${{ secrets.WAVE_SENDGRID_TOKEN }}
45-
# List of emails separated by comma that the email will go
46-
mail: ${{ secrets.EVERGINE_EMAILREPORT_LIST }}
47-
# The email that will be shown as sender
48-
from: ${{ secrets.EVERGINE_EMAIL }}
49-
# The subject of the email
50-
subject: RenderDoc Update NuGet has failed
51-
# Defines if it should be one email with multiple address or multiple emails with a single address
52-
individual: false
53-
# The body of the mail. The placeholders that can be used are $EVENT$, $ISSUE$, $ACTION$
54-
text: something went wrong when building RenderDoc
12+
cd:
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: "RenderDocGen/RenderDocGen/RenderDocGen.csproj" # Path to your generator .csproj
17+
generator-name: "RenderDoc" # Name of your generator executable
18+
binding-project: "RenderDocGen/Evergine.Bindings.RenderDoc/Evergine.Bindings.RenderDoc.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 # Publish NuGets to Nuget.org
26+
enable-email-notifications: true # Enable email notifications on failure
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

.github/workflows/CI.yml

Lines changed: 24 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,43 +1,32 @@
1+
# Binding CI - Simple Template
2+
3+
# This template is for .NET bindings.
4+
# Copy this file to your repository as `.github/workflows/CI.yml` and customize the inputs below.
5+
16
name: CI
7+
28
on:
9+
workflow_dispatch:
310
push:
411
branches: [ "master" ]
512
pull_request:
613
branches: [ "master" ]
714

8-
env:
9-
nugetOutputPath: ${{ 'nupkgs' }}
10-
1115
jobs:
12-
build_and_publish:
13-
runs-on: windows-latest
14-
steps:
15-
- uses: actions/checkout@v4
16-
- uses: actions/setup-dotnet@v4
17-
with:
18-
dotnet-version: 8.x
19-
- uses: nuget/setup-nuget@v2
20-
with:
21-
nuget-version: "6.x"
22-
- name: Generate Bindings
23-
id: build_bindings
24-
run: powershell ./Generate-Bindings.ps1
25-
- name: Generate NuGet packages
26-
id: build_nugets
27-
run: powershell ./Generate-NuGets.ps1 -revision ${{ github.run_number }} -outputfolder ${{ env.nugetOutputPath }}
28-
- name: SendGrid Mail Action
29-
if: ${{ failure() }}
30-
uses: mmichailidis/sendgrid-mail-action@v1.1
31-
with:
32-
# The token for sendgrid
33-
sendgrid-token: ${{ secrets.WAVE_SENDGRID_TOKEN }}
34-
# List of emails separated by comma that the email will go
35-
mail: ${{ secrets.EVERGINE_EMAILREPORT_LIST }}
36-
# The email that will be shown as sender
37-
from: ${{ secrets.EVERGINE_EMAIL }}
38-
# The subject of the email
39-
subject: RenderDoc Update NuGet has failed
40-
# Defines if it should be one email with multiple address or multiple emails with a single address
41-
individual: false
42-
# The body of the mail. The placeholders that can be used are $EVENT$, $ISSUE$, $ACTION$
43-
text: something went wrong when building RenderDoc
16+
ci:
17+
uses: EvergineTeam/evergine-standards/.github/workflows/binding-common-ci.yml@main
18+
with:
19+
generator-project: "RenderDocGen/RenderDocGen/RenderDocGen.csproj" # Path to your generator .csproj
20+
generator-name: "RenderDoc" # Name of your generator executable
21+
binding-project: "RenderDocGen/Evergine.Bindings.RenderDoc/Evergine.Bindings.RenderDoc.csproj" # Path to your binding .csproj
22+
target-framework: "net8.0" # Target framework for generator/binding
23+
runtime-identifier: "win-x64" # Runtime identifier (win-x64, linux-x64, etc.)
24+
build-configuration: "Release" # Build configuration (Release, Debug, etc.)
25+
nuget-artifacts: false # Upload NuGets as workflow artifacts
26+
revision: ${{ github.run_number }} # Revision for date-based version (bindings style). Use with bindings.
27+
28+
# Tips:
29+
# - For direct version (add-ons style):
30+
# version: "3.4.22.288-local"
31+
# - For date-based version (bindings style):
32+
# revision: "" # Uses github.run_number or custom logic
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Sync standards
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
org:
7+
description: "Standards org"
8+
default: "EvergineTeam"
9+
required: false
10+
repo:
11+
description: "Standards repo"
12+
default: "evergine-standards"
13+
required: false
14+
ref:
15+
description: "Branch/tag/commit of standards"
16+
default: "main"
17+
required: false
18+
target_branch:
19+
description: "Target branch to apply changes"
20+
default: "master"
21+
required: false
22+
script_path:
23+
description: "Path where to download the sync script"
24+
default: "sync-standards.ps1"
25+
required: false
26+
commit_message:
27+
description: "Commit message"
28+
required: false
29+
mode:
30+
description: "auto (push then PR if needed) or pr (always PR)"
31+
default: "auto"
32+
required: false
33+
dry_run:
34+
description: "Dry run mode - show what would be done without making changes"
35+
type: boolean
36+
default: false
37+
required: false
38+
39+
schedule:
40+
- cron: "0 2 1 * *" # 02:00 UTC on the 1st of every month
41+
42+
jobs:
43+
sync:
44+
if: github.event_name != 'schedule' || github.ref == 'refs/heads/master'
45+
permissions:
46+
contents: write # allow push commits
47+
pull-requests: write
48+
uses: EvergineTeam/evergine-standards/.github/workflows/_sync-standards-reusable.yml@main
49+
with:
50+
org: ${{ github.event.inputs.org || 'EvergineTeam' }}
51+
repo: ${{ github.event.inputs.repo || 'evergine-standards' }}
52+
ref: ${{ github.event.inputs.ref || 'main' }}
53+
target_branch: ${{ github.event.inputs.target_branch || 'master' }}
54+
script_path: ${{ github.event.inputs.script_path || 'sync-standards.ps1' }}
55+
commit_message: "${{ github.event.inputs.commit_message || vars.STANDARDS_COMMIT_MESSAGE || 'auto: sync standard files [skip ci]' }}"
56+
mode: ${{ github.event.inputs.mode || 'auto' }}
57+
dry_run: ${{ github.event.inputs.dry_run == 'true' }}
58+
secrets: inherit

.standards.override.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"schema": "2",
3+
"groups": [
4+
"core",
5+
"binding"
6+
],
7+
"remap": {
8+
"assets/nuget-icon.png": "icon.png"
9+
}
10+
}

Generate-Bindings.ps1

Lines changed: 0 additions & 56 deletions
This file was deleted.

Generate-NuGets.ps1

Lines changed: 0 additions & 56 deletions
This file was deleted.

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Evergine
3+
Copyright (c) 2025 Evergine
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

0 commit comments

Comments
 (0)