Skip to content

Commit

Permalink
Added installer to build workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
BuzzteeBear committed Oct 24, 2024
1 parent 182f52e commit 62c93b1
Show file tree
Hide file tree
Showing 2 changed files with 85 additions and 16 deletions.
99 changes: 83 additions & 16 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ name: Build

on:
workflow_dispatch:
inputs:
version:
required: true

env:
# Path to the solution file relative to the root of the project.
Expand All @@ -22,11 +25,12 @@ permissions:

jobs:
build:
runs-on: windows-2019
runs-on: windows-latest

strategy:
matrix:
platform: [win32, x64]
environment: ${{ matrix.platform }}

steps:
- name: Check out repository
Expand All @@ -48,45 +52,108 @@ jobs:
working-directory: ${{env.GITHUB_WORKSPACE}}
run: msbuild /t:rebuild /p:Configuration=${{env.BUILD_CONFIGURATION}} /p:Platform=${{matrix.platform}} /v:diag ${{env.SOLUTION_FILE_PATH}}

- name: Attest provenance
- name: Attest DLL provenance
uses: actions/attest-build-provenance@v1
with:
subject-path: 'bin\${{matrix.platform}}\${{env.BUILD_CONFIGURATION}}\*.dll'

- name: Attest MMF Reader provenance
if: ${{matrix.platform == 'x64'}}
uses: actions/attest-build-provenance@v1
with:
subject-path: 'bin\${{matrix.platform}}\${{env.BUILD_CONFIGURATION}}\MmfReader\*.exe'

- name: Attest Dashboard provenance
if: ${{matrix.platform == 'x64'}}
uses: actions/attest-build-provenance@v1
with:
subject-path: 'bin\${{matrix.platform}}\${{env.BUILD_CONFIGURATION}}\net8.0-windows\*.exe'

- name: Upload artifact
uses: actions/upload-artifact@v4
id: artifact-upload-step
id: binary-upload-step
with:
name: oxrmc-binary-(${{matrix.platform}})
path: |
bin\${{matrix.platform}}\${{env.BUILD_CONFIGURATION}}\*.dll
bin\${{matrix.platform}}\${{env.BUILD_CONFIGURATION}}\MmfReader\*.exe
name: oxrmc-bin-(${{matrix.platform}})
path: bin\

- name: Check file system
run: echo $(dir)

merge:
runs-on: windows-2019
runs-on: windows-latest
needs: build
outputs:
artifact-id: ${{ steps.artifact-merge-step.outputs.artifact-id }}
artifact-id: ${{ steps.binary-merge-step.outputs.artifact-id }}

steps:
- name: Merge artifacts
uses: actions/upload-artifact/merge@v4
id: artifact-merge-step
id: binary-merge-step
with:
name: oxrmc-binaries
name: oxrmc-bin
delete-merged: true

sign:
runs-on: windows-2019
sign_binaries:
runs-on: windows-latest
needs: merge
outputs:
artifact-id: ${{ steps.installer-upload-step.outputs.artifact-id }}

steps:
- name: Check out repository
uses: actions/checkout@v4

- name: Request SignPath signature
uses: signpath/github-action-submit-signing-request@v0.4
uses: signpath/github-action-submit-signing-request@v1
with:
api-token: ${{secrets.APPVEYOR_API_TOKEN}}
organization-id: 11e4bc12-01ae-4f8c-8c5f-233747e24ab1
project-slug: OpenXR-MotionCompensation
signing-policy-slug: release-signing
signing-policy-slug: test-signing
github-artifact-id: ${{needs.merge.outputs.artifact-id}}
wait-for-completion: true
output-artifact-directory: 'bin'
parameters: |
version: "${{ inputs.version }}"
wait-for-completion: true

- name: Check zip file
run: echo $(dir bin)

- name: Build inno setup installer
uses: Minionguyjpro/[email protected]
with:
path: installer/OpenXR-MotionCompensation.iss

- name: Attest provenance
uses: actions/attest-build-provenance@v1
with:
subject-path: 'bin\installer\*.exe'

- name: Upload artifact
uses: actions/upload-artifact@v4
id: installer-upload-step
with:
name: oxrmc-installer
path: 'bin\installer\*.exe'

sign_installer:
runs-on: windows-latest
needs: sign_binaries

steps:
- name: Request SignPath signature
uses: signpath/github-action-submit-signing-request@v1
with:
api-token: ${{secrets.APPVEYOR_API_TOKEN}}
organization-id: 11e4bc12-01ae-4f8c-8c5f-233747e24ab1
project-slug: OpenXR-MotionCompensation
signing-policy-slug: test-signing
github-artifact-id: ${{needs.sign_binaries.outputs.artifact-id}}
parameters: |
version: "${{ inputs.version }}"
wait-for-completion: true

- name: Remove installer artifact
uses: geekyeggo/delete-artifact@v5
with:
name: oxrmc-installer
2 changes: 2 additions & 0 deletions OxrmcDashboard/OxrmcDashboard.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
<Version>$(VersionMajor).$(VersionMinor).$(VersionPatch).$(VersionRevision)</Version>
<IncludeSourceRevisionInInformationalVersion>false</IncludeSourceRevisionInInformationalVersion>
<StartupObject>OxrmcDashboard.App</StartupObject>
<Product>OpenXR-MotionCompensation</Product>
<Description>Dashboard app for OpenXR Motion Compensation project</Description>
</PropertyGroup>

<ItemGroup>
Expand Down

0 comments on commit 62c93b1

Please sign in to comment.