-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #28 from sgrottel/more-ci-build-actions
Build actions for native mini tools
- Loading branch information
Showing
5 changed files
with
194 additions
and
1 deletion.
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,55 @@ | ||
name: Beep Build Action | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths: | ||
- .github/workflows/Beep.yaml | ||
- beep/** | ||
pull_request: | ||
branches: [ "main" ] | ||
paths: | ||
- .github/workflows/Beep.yaml | ||
- beep/** | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
configuration: [Debug, Release] | ||
platform: [x64, x86] | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Add MSBuild to PATH | ||
uses: microsoft/setup-msbuild@v2 | ||
|
||
- name: Build | ||
working-directory: . | ||
# Add additional options to the MSBuild command line here (like platform or verbosity level). | ||
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference | ||
run: msbuild /m /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} beep\beep.sln | ||
|
||
- name: Copy Extra Files | ||
if: ${{ matrix.configuration == 'Release' && matrix.platform == 'x64' }} | ||
shell: pwsh | ||
run: | | ||
copy .\LICENSE ./beep/bin/${{matrix.platform}}/${{matrix.configuration}} | ||
.\Scripts\makeProjReadme.ps1 Beep ./beep/bin/${{matrix.platform}}/${{matrix.configuration}}/README.md | ||
- name: Upload Artifacts | ||
if: ${{ matrix.configuration == 'Release' && matrix.platform == 'x64' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: Beep-0.0.0.${{github.run_number}} | ||
path: | | ||
beep/bin/${{matrix.platform}}/${{matrix.configuration}} | ||
!**/*.pdb | ||
if-no-files-found: error |
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,77 @@ | ||
name: HWndToFront Build Action | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths: | ||
- .github/workflows/HWndToFront.yaml | ||
- HWndToFront/** | ||
pull_request: | ||
branches: [ "main" ] | ||
paths: | ||
- .github/workflows/HWndToFront.yaml | ||
- HWndToFront/** | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
configuration: [Debug, Release] | ||
platform: [x64, x86] | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Add MSBuild to PATH | ||
uses: microsoft/setup-msbuild@v2 | ||
|
||
- name: Inject build number | ||
shell: pwsh | ||
working-directory: ./HWndToFront | ||
run: | | ||
$vf = get-content "Version.h" -Raw | ||
$vf -match '\n#define\s+HWND_TO_FRONT_VER_MAJOR\s+(\d+)\s*\n' | Out-Null | ||
$major = $Matches[1] | ||
$vf -match '\n#define\s+HWND_TO_FRONT_VER_MINOR\s+(\d+)\s*\n' | Out-Null | ||
$minor = $Matches[1] | ||
$vf -match '\n#define\s+HWND_TO_FRONT_VER_PATCH\s+(\d+)\s*\n' | Out-Null | ||
$patch = $Matches[1] | ||
$nvf = $vf -replace '(\n#define\s+HWND_TO_FRONT_VER_BUILD\s+)(\d+)(\s*\n)',"`${1}$env:GITHUB_RUN_NUMBER`$3" | ||
set-content "Version.h" $nvf -force -nonewline | ||
$version = New-Object System.Version @( $major, $minor, $patch, $env:GITHUB_RUN_NUMBER ) | ||
Write-Host "Version number: $version" | ||
Write-Output "FULL_VERSION_NUMBER=$version" >> $env:GITHUB_ENV | ||
- name: Build | ||
working-directory: . | ||
# Add additional options to the MSBuild command line here (like platform or verbosity level). | ||
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference | ||
run: msbuild /m /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} HWndToFront\HWndToFront.sln | ||
|
||
- name: Copy Extra Files | ||
if: ${{ matrix.configuration == 'Release' && matrix.platform == 'x64' }} | ||
shell: pwsh | ||
run: | | ||
copy .\LICENSE ./HWndToFront/bin/${{matrix.platform}}/${{matrix.configuration}} | ||
.\Scripts\makeProjReadme.ps1 HWndToFront ./HWndToFront/bin/${{matrix.platform}}/${{matrix.configuration}}/README.md | ||
- name: Upload Artifacts | ||
if: ${{ matrix.configuration == 'Release' && matrix.platform == 'x64' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: HWndToFront-${{env.FULL_VERSION_NUMBER}} | ||
path: | | ||
HWndToFront/bin/${{matrix.platform}}/${{matrix.configuration}} | ||
!**/*.pdb | ||
if-no-files-found: error |
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,55 @@ | ||
name: StartPwsh Build Action | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths: | ||
- .github/workflows/StartPwsh.yaml | ||
- StartPwsh/** | ||
pull_request: | ||
branches: [ "main" ] | ||
paths: | ||
- .github/workflows/StartPwsh.yaml | ||
- StartPwsh/** | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
configuration: [Debug, Release] | ||
platform: [x64, x86] | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Add MSBuild to PATH | ||
uses: microsoft/setup-msbuild@v2 | ||
|
||
- name: Build | ||
working-directory: . | ||
# Add additional options to the MSBuild command line here (like platform or verbosity level). | ||
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference | ||
run: msbuild /m /p:Configuration=${{matrix.configuration}} /p:Platform=${{matrix.platform}} StartPwsh\StartPwsh.sln | ||
|
||
- name: Copy Extra Files | ||
if: ${{ matrix.configuration == 'Release' && matrix.platform == 'x64' }} | ||
shell: pwsh | ||
run: | | ||
copy .\LICENSE ./StartPwsh/bin/${{matrix.platform}}/${{matrix.configuration}} | ||
.\Scripts\makeProjReadme.ps1 StartPwsh ./StartPwsh/bin/${{matrix.platform}}/${{matrix.configuration}}/README.md | ||
- name: Upload Artifacts | ||
if: ${{ matrix.configuration == 'Release' && matrix.platform == 'x64' }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: StartPwsh-0.0.0.${{github.run_number}} | ||
path: | | ||
StartPwsh/bin/${{matrix.platform}}/${{matrix.configuration}} | ||
!**/*.pdb | ||
if-no-files-found: error |
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
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.