-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Template CI Github Workflow (#13)
This PR adds a github workflow that will attempt to create projects from the templates in all supported dotnet SDK versions (6, 7, & 8) when a push to any branch or a PR is made (if the action is approved to run). This acts as two checks. The first, to make sure templates can be used at all. The second, to make sure templates can be used in all of the supported SDK versions.
- Loading branch information
Showing
2 changed files
with
100 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Install Templates | ||
run: | | ||
dotnet new --install ./BepInEx.Templates/templates/ | ||
shell: bash | ||
|
||
- name: Test BepInEx5 Template | ||
if: always() | ||
run: | | ||
dotnet new bepinex5plugin --dry-run --diagnostics | ||
shell: bash | ||
|
||
- name: Test BepInEx6 .NET Core Template | ||
if: always() | ||
run: | | ||
dotnet new bep6plugin_coreclr --dry-run --diagnostics | ||
shell: bash | ||
|
||
- name: Test BepInEx6 .NET Framework Template | ||
if: always() | ||
run: | | ||
dotnet new bep6plugin_netfx --dry-run --diagnostics | ||
shell: bash | ||
|
||
- name: Test BepInEx6 Unity IL2CPP Template | ||
if: always() | ||
run: | | ||
dotnet new bep6plugin_unity_il2cpp --dry-run --diagnostics | ||
shell: bash | ||
|
||
- name: Test BepInEx6 Unity Mono Template | ||
if: always() | ||
run: | | ||
dotnet new bep6plugin_unity_mono --dry-run --diagnostics | ||
shell: bash |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
name: Verify Templates | ||
|
||
on: | ||
push: | ||
pull_request: | ||
|
||
jobs: | ||
test-sdk6: | ||
name: Test .NET SDK 6 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET env | ||
uses: actions/setup-dotnet@v4 | ||
id: setup-dotnet | ||
with: | ||
dotnet-version: 6.x | ||
|
||
- run: | | ||
dotnet new globaljson --sdk-version ${{ steps.setup-dotnet.outputs.dotnet-version }} | ||
- name: Dry-run Templates | ||
uses: ./.github/actions/dryrun-templates | ||
|
||
test-sdk7: | ||
name: Test .NET SDK 7 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET env | ||
uses: actions/setup-dotnet@v4 | ||
id: setup-dotnet | ||
with: | ||
dotnet-version: 7.x | ||
|
||
- run: | | ||
dotnet new globaljson --sdk-version ${{ steps.setup-dotnet.outputs.dotnet-version }} | ||
- name: Dry-run Templates | ||
uses: ./.github/actions/dryrun-templates | ||
|
||
test-sdk8: | ||
name: Test .NET SDK 8 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Fetch Sources | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup .NET env | ||
uses: actions/setup-dotnet@v4 | ||
id: setup-dotnet | ||
with: | ||
dotnet-version: 8.x | ||
|
||
- run: | | ||
dotnet new globaljson --sdk-version ${{ steps.setup-dotnet.outputs.dotnet-version }} | ||
- name: Dry-run Templates | ||
uses: ./.github/actions/dryrun-templates |