Prepare for 2.1.0 #33
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
name: b2s-designer | |
on: | |
push: | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
build-designer: | |
name: Build B2S.designer-${{ matrix.config }}-win-${{ matrix.platform }} | |
runs-on: windows-2019 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- platform: x64 | |
config: Debug | |
- platform: x64 | |
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/setup-msbuild@v2 | |
- 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: Help | |
run: | | |
choco install html-help-workshop | |
"/c/Program Files (x86)/HTML Help Workshop/hhc.exe" "b2sbackglassdesigner/b2sbackglassdesigner/htmlhelp/B2SBackglassDesigner.hhp" || true | |
- name: Bundle | |
run: | | |
mkdir tmp | |
cp B2SVPinMAMEStarter/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SVPinMAMEStarter.exe tmp | |
cp b2sbackglassdesigner/b2sbackglassdesigner/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SBackglassDesigner.exe tmp | |
if [[ "${{ matrix.config }}" == "Debug" ]]; then | |
cp B2SVPinMAMEStarter/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SVPinMAMEStarter.pdb tmp | |
cp b2sbackglassdesigner/b2sbackglassdesigner/bin/${{ matrix.platform }}/${{ matrix.config }}/B2SBackglassDesigner.pdb tmp | |
fi | |
cp b2sbackglassdesigner/b2sbackglassdesigner/htmlhelp/B2SBackglassDesigner.chm tmp | |
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 |