Skip to content

Commit

Permalink
Update template. Bump SWPSDK.
Browse files Browse the repository at this point in the history
  • Loading branch information
sawich committed Sep 14, 2024
1 parent 0e22edd commit 1cc6f7d
Show file tree
Hide file tree
Showing 7 changed files with 377 additions and 311 deletions.
86 changes: 86 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: "Continuous Integration"

on: [push]

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VCPKG_BINARY_SOURCES: "clear;x-gha,readwrite"
VCPKG_FEATURE_FLAGS: "dependencygraph"

permissions:
contents: "write"

jobs:
publish:
runs-on: "windows-latest"
strategy:
fail-fast: true
matrix:
build-config: ["Debug", "Release"]
arch: ["x64", "x86"]
path: ["swp/**/*.dll swp/**/*.pdb", "swp/**/*.dll"]

env:
ARCHIVE_NAME: ${{ github.event.repository.name }}-${{ github.ref_name }}-${{ matrix.build-config }}-${{ matrix.arch }}${{ contains(matrix.path, '.pdb') && '-WithDebugSymbols' || '' }}.zip

name: "Build a ${{ matrix.build-config }} (${{ matrix.arch }} | ${{ matrix.path }}) version"
steps:
- name: "Export GitHub Actions cache environment variables"
uses: "actions/github-script@main"
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: "Print Archive name"
run: |
echo ${{ env.ARCHIVE_NAME }}
- id: "variables"
name: "Generate Variables"
run: |
$name = ("${{ github.event.repository.name }}".Substring(4) -split '-') | ForEach-Object { $_.Substring(0, 1).ToUpper() + $_.Substring(1).ToLower() } | Join-String -Separator ' ';
echo "name=$name" >> $env:GITHUB_OUTPUT
if ("${{ github.ref_name }}" -match '^v[0-9]+.[0-9]+.[0-9]+$') {
echo "is_test=false" >> $env:GITHUB_OUTPUT
} else {
echo "is_test=true" >> $env:GITHUB_OUTPUT
}
- name: "Release name"
run: 'echo "Release name: ${{ steps.variables.outputs.name }}"'

- name: "Is Test?"
run: 'echo "Test status: ${{ steps.variables.outputs.is_test }}"'

- name: "Checkout"
uses: "actions/checkout@main"
with:
submodules: true

- name: "Add MSBuild to PATH"
uses: "microsoft/setup-msbuild@main"
with:
vs-prerelease: true

- name: "Integrate vcpkg"
run: "vcpkg integrate install"

- name: "Build solution"
run: "msbuild /m /p:Configuration=${{ matrix.build-config }} /property:Platform=${{ matrix.arch }}"

- name: "Pack to archive"
run: |
cd bin/${{ matrix.build-config }}
7z -r a ../../${{ env.ARCHIVE_NAME }} ${{ matrix.path }}
7z l ../../${{ env.ARCHIVE_NAME }}
- name: "Publish build"
uses: "softprops/action-gh-release@master"
if: ${{ steps.variables.outputs.is_test == 'false' }}
with:
name: "SoulWorkerPlugin ${{ steps.variables.outputs.name }} ${{ github.ref_name }}"
files: ${{ env.ARCHIVE_NAME }}
generate_release_notes: true
tag_name: "${{ github.ref_name }}"
32 changes: 0 additions & 32 deletions .github/workflows/test-build.yml

This file was deleted.

31 changes: 21 additions & 10 deletions swp-template.sln
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@ Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 17
VisualStudioVersion = 17.1.32104.313
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "swp-template", "swp-template\project\swp-template.vcxproj", "{46B22A81-4972-4D6B-8EC9-91EF44B30095}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution Files", "{51AF7FAB-6B50-4829-B826-FE71498E3674}"
ProjectSection(SolutionItems) = preProject
.gitignore = .gitignore
Expand All @@ -15,6 +13,15 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Files", "Solution
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "swp-sdk", "swp-sdk\swp-sdk\projects\windows\swp-sdk.vcxproj", "{FAF6A873-FC74-4CF9-9767-07B6513B9CCD}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".github", ".github", "{1F3DF414-6135-462D-85B5-DC199EF6DAFC}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "workflows", "workflows", "{DE1F8123-BF9A-4D1A-819A-B9B5963BE113}"
ProjectSection(SolutionItems) = preProject
.github\workflows\ci.yml = .github\workflows\ci.yml
EndProjectSection
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "swp-template", "swp-template\projects\windows\swp-template.vcxproj", "{46B22A81-4972-4D6B-8EC9-91EF44B30095}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Expand All @@ -23,14 +30,6 @@ Global
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Debug|x64.ActiveCfg = Debug|x64
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Debug|x64.Build.0 = Debug|x64
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Debug|x86.ActiveCfg = Debug|Win32
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Debug|x86.Build.0 = Debug|Win32
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Release|x64.ActiveCfg = Release|x64
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Release|x64.Build.0 = Release|x64
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Release|x86.ActiveCfg = Release|Win32
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Release|x86.Build.0 = Release|Win32
{FAF6A873-FC74-4CF9-9767-07B6513B9CCD}.Debug|x64.ActiveCfg = Debug|x64
{FAF6A873-FC74-4CF9-9767-07B6513B9CCD}.Debug|x64.Build.0 = Debug|x64
{FAF6A873-FC74-4CF9-9767-07B6513B9CCD}.Debug|x86.ActiveCfg = Debug|Win32
Expand All @@ -39,10 +38,22 @@ Global
{FAF6A873-FC74-4CF9-9767-07B6513B9CCD}.Release|x64.Build.0 = Release|x64
{FAF6A873-FC74-4CF9-9767-07B6513B9CCD}.Release|x86.ActiveCfg = Release|Win32
{FAF6A873-FC74-4CF9-9767-07B6513B9CCD}.Release|x86.Build.0 = Release|Win32
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Debug|x64.ActiveCfg = Debug|x64
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Debug|x64.Build.0 = Debug|x64
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Debug|x86.ActiveCfg = Debug|Win32
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Debug|x86.Build.0 = Debug|Win32
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Release|x64.ActiveCfg = Release|x64
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Release|x64.Build.0 = Release|x64
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Release|x86.ActiveCfg = Release|Win32
{46B22A81-4972-4D6B-8EC9-91EF44B30095}.Release|x86.Build.0 = Release|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{1F3DF414-6135-462D-85B5-DC199EF6DAFC} = {51AF7FAB-6B50-4829-B826-FE71498E3674}
{DE1F8123-BF9A-4D1A-819A-B9B5963BE113} = {1F3DF414-6135-462D-85B5-DC199EF6DAFC}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {228D6202-B35F-4215-9B8D-5B0AF4E654ED}
EndGlobalSection
Expand Down
Loading

0 comments on commit 1cc6f7d

Please sign in to comment.