-
Notifications
You must be signed in to change notification settings - Fork 3
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 #1 from rinrab/master
Create Installer and publish with GitHub Actions.
- Loading branch information
Showing
12 changed files
with
565 additions
and
12 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,35 @@ | ||
name: Build | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
pull_request: | ||
branches: [ "master" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/setup-msbuild@v1.1 | ||
|
||
- name: Restore | ||
run: msbuild pbench.sln /t:restore /p:Configuration=Release /p:Platform=x86 | ||
|
||
- name: Build | ||
run: msbuild pbench.sln /t:build /p:Configuration=Release /p:Platform=x86 /p:RestorePackages=false | ||
|
||
- name: Prepare artifact | ||
run: | | ||
mkdir -Path .\artifact | ||
copy -Path .\_bin\Release-x86\pbench.exe -Destination .\artifact | ||
copy -Path .\_bin\Release-x86\en-US\pbench.msi -Destination .\artifact | ||
- name: Upload build artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: pbench | ||
path: .\artifact |
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,64 @@ | ||
name: Publish | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
permissions: write-all | ||
|
||
jobs: | ||
create_release: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Create Release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: Release ${{ github.ref }} | ||
draft: true | ||
prerelease: false | ||
|
||
outputs: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
|
||
build: | ||
needs: create_release | ||
|
||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Add msbuild to PATH | ||
uses: microsoft/setup-msbuild@v1.1 | ||
|
||
- name: Restore | ||
run: msbuild pbench.sln /t:restore /p:Configuration=Release /p:Platform=x86 | ||
|
||
- name: Build | ||
run: msbuild pbench.sln /t:build /p:Configuration=Release /p:Platform=x86 /p:RestorePackages=false | ||
|
||
- name: Upload pbench.msi to Release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_path: .\_bin\Release-x86\en-US\pbench.msi | ||
asset_name: pbench-${{ github.ref_name }}.msi | ||
asset_content_type: application/msi | ||
|
||
- name: Upload pbench.exe to Release | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.upload_url }} | ||
asset_path: .\_bin\Release-x86\pbench.exe | ||
asset_name: pbench.exe | ||
asset_content_type: application/exe |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
_bin/* | ||
.vs/* | ||
*.user | ||
*.user | ||
bin | ||
obj |
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,6 @@ | ||
<Project> | ||
<Import Project="Version.props" /> | ||
<PropertyGroup> | ||
<Version>$(VersionMajor).$(VersionMinor).$(VersionPatch)</Version> | ||
</PropertyGroup> | ||
</Project> |
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,17 @@ | ||
<Project Sdk="WixToolset.Sdk/4.0.3"> | ||
<PropertyGroup> | ||
<OutputName>pbench</OutputName> | ||
<OutDir>$(SolutionDir)_bin\$(Configuration)-$(Platform)\</OutDir> | ||
<IntermediateOutputPath>$(SolutionDir)_bin\$(Configuration)-$(Platform)\tmp\$(MSBuildProjectName)\</IntermediateOutputPath> | ||
<DefineConstants>Version=$(Version)</DefineConstants> | ||
</PropertyGroup> | ||
<ItemGroup> | ||
<None Include="LICENSE.rtf" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<PackageReference Include="WixToolset.UI.wixext" Version="4.0.3" /> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ProjectReference Include="..\pbench\pbench.vcxproj" /> | ||
</ItemGroup> | ||
</Project> |
Oops, something went wrong.