Version bump #209
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
on: [push] | |
jobs: | |
build: | |
runs-on: windows-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
configuration: [Release, Debug] | |
outputs: | |
hashReleaseInstaller: ${{ steps.hash.outputs.hashRelease }} | |
hashDebugInstaller: ${{ steps.hash.outputs.hashDebug }} | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: microsoft/setup-msbuild@v2 | |
- name: vcpkg build | |
id: vcpkg | |
uses: johnwason/vcpkg-action@v6 | |
with: | |
manifest-dir: ${{ github.workspace }} # Set to directory containing vcpkg.json | |
# pkgs: nlohmann-json boost-asio boost-optional boost-utility boost-date-time boost-beast wintoast openssl | |
triplet: x64-windows-static | |
token: ${{ github.token }} | |
github-binarycache: true | |
- run: vcpkg integrate install | |
- run: msbuild LGTVCompanion.sln /p:VcpkgEnableManifest=true | |
env: | |
Configuration: ${{ matrix.configuration }} | |
- name: Generate hash | |
id: hash | |
shell: bash | |
run: | | |
echo "hash${{ matrix.configuration }}=$( sha256sum 'LGTV Companion Setup/bin/${{ matrix.configuration }}/LGTV Companion Setup.msi' | base64 -w0 )" >> "$GITHUB_OUTPUT" | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: LGTVCompanion-Output-${{ matrix.configuration }} | |
path: x64/${{ matrix.configuration }}/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: LGTVCompanion-Setup-${{ matrix.configuration }} | |
path: LGTV Companion Setup/bin/${{ matrix.configuration }}/ | |
provenance: | |
needs: [build] | |
if: startsWith(github.ref, 'refs/tags/') | |
permissions: | |
actions: read # To read the workflow path. | |
id-token: write # To sign the provenance. | |
contents: write # To add assets to a release. | |
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected] | |
with: | |
base64-subjects: "${{ needs.build.outputs.hashReleaseInstaller }}" | |
draft-release: false | |
upload-assets: false # Optional: Upload to a new release | |
release: | |
needs: [build, provenance] | |
runs-on: ubuntu-latest | |
if: startsWith(github.ref, 'refs/tags/') | |
permissions: | |
contents: write # To add assets to a release. | |
steps: | |
- name: Download Installer | |
uses: actions/download-artifact@v4 | |
with: | |
name: LGTVCompanion-Setup-Release | |
- name: Download Provenance | |
uses: actions/download-artifact@v4 | |
with: | |
name: LGTV Companion Setup.msi.intoto.jsonl | |
- name: Upload assets | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
LGTV Companion Setup.msi | |
LGTV Companion Setup.msi.intoto.jsonl | |
draft: true | |
generate_release_notes: true |