Skip to content

Cache html-help-workshop #74

Cache html-help-workshop

Cache html-help-workshop #74

Workflow file for this run

name: b2s-designer
on:
push:
defaults:
run:
shell: bash
jobs:
build-designer:
name: Build B2S.designer-${{ matrix.config }}-win-${{ matrix.platform }}
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
include:
- platform: "Any CPU"
config: Debug
- platform: "Any CPU"
config: Release
steps:
- uses: actions/checkout@v4
- id: version
name: Update AssemblyInformationalVersion
run: |
SHA7="${GITHUB_SHA::7}"
ASSEMBLY_INFO="B2SVPinMAMEStarter/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
ASSEMBLY_INFO="b2sbackglassdesigner/b2sbackglassdesigner/My Project/AssemblyInfo.vb"
VERSION=$(grep -Eo "AssemblyVersion\(.*\)" "${ASSEMBLY_INFO}" | grep -Eo "[0-9\.]+" | tail -1)
TAG="${VERSION}-${SHA7}-${{ github.run_number }}"
perl -i -pe"s/AssemblyInformationalVersion\(\".*\"\)/AssemblyInformationalVersion\(\"${TAG}\"\)/g" "${ASSEMBLY_INFO}"
echo "tag=${TAG}" >> $GITHUB_OUTPUT
- uses: microsoft/[email protected]
- name: Build
run: |
msbuild B2SVPinMAMEStarter/B2SVPinMAMEStarter.sln /t:Rebuild /p:Configuration=${{ matrix.config }} "/p:Platform=${{ matrix.platform }}"
msbuild b2sbackglassdesigner/B2SBackglassDesigner.sln /t:Rebuild /p:Configuration=${{ matrix.config }} "/p:Platform=${{ matrix.platform }}"
shell: cmd
- name: Cache html-help-workshop
uses: actions/cache@v4
with:
path: C:\ProgramData\chocolatey\lib\html-help-workshop
key: html-help-workshop-${{ runner.os }}-v1
- name: Install html-help-workshop
if: steps.cache-html-help-workshop.outputs.cache-hit != 'true'
run: choco install --yes --no-progress html-help-workshop
- name: Build Help
run: |
"/c/Program Files (x86)/HTML Help Workshop/hhc.exe" "b2sbackglassdesigner/b2sbackglassdesigner/htmlhelp/B2SBackglassDesigner.hhp" || true
- name: Bundle
run: |
mkdir tmp
cp B2SVPinMAMEStarter/bin/x64/${{ matrix.config }}/B2SVPinMAMEStarter.exe tmp
cp b2sbackglassdesigner/b2sbackglassdesigner/bin/x64/${{ matrix.config }}/B2SBackglassDesigner.exe tmp
if [[ "${{ matrix.config }}" == "Debug" ]]; then
cp B2SVPinMAMEStarter/bin/x64/${{ matrix.config }}/B2SVPinMAMEStarter.pdb tmp
cp b2sbackglassdesigner/b2sbackglassdesigner/bin/x64/${{ matrix.config }}/B2SBackglassDesigner.pdb tmp
fi
cp b2sbackglassdesigner/b2sbackglassdesigner/htmlhelp/B2SBackglassDesigner.chm tmp || true
cp license.txt tmp
cp Changelog.txt tmp
- uses: actions/upload-artifact@v4
with:
name: B2S.Designer-${{ steps.version.outputs.tag }}-${{ matrix.config }}-win-AnyCPU
path: tmp