Merge pull request #326 from Dn-Programming-Core-Management/version-i… #6
Workflow file for this run
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: build-artifact-publish | |
on: | |
push: | |
tags: | |
- "*" | |
env: | |
commithash: "" | |
jobs: | |
build-matrix-publish: | |
runs-on: windows-2022 | |
strategy: | |
matrix: | |
platform: [x64, Win32] | |
# configuration is Release only | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: "recursive" | |
fetch-depth: 0 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
with: | |
pandoc-version: '3.1.8' | |
- name: Set commit hash variable | |
shell: powershell | |
run: echo "commithash=$(git describe --tags)" >> $env:GITHUB_ENV | |
- name: Build program | |
shell: cmd | |
run: | | |
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsamd64_x86.bat" | |
call msbuild -m:5 -nologo -p:Configuration="Release" -p:Platform="${{ matrix.platform }}" | |
if %ERRORLEVEL%==1 exit %ERRORLEVEL% | |
call release.bat Release ${{ matrix.platform }} | |
- name: Upload binaries | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Dn-FamiTracker_${{ env.commithash }}_${{ github.run_id }}_${{ matrix.platform }} | |
path: distribute/*_${{ matrix.platform }}_Release.7z | |
publish-build: | |
needs: build-matrix-publish | |
runs-on: windows-2022 | |
steps: | |
- name: Download binaries | |
uses: actions/download-artifact@v4 | |
with: | |
path: Dn-FamiTracker_artifacts | |
pattern: Dn-FamiTracker_* | |
merge-multiple: true | |
shell: powershell | |
- run: ls -R | |
- name: Upload release | |
uses: softprops/action-gh-release@v2 | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
draft: true | |
prerelease: false | |
tag_name: draft | |
files: Dn-FamiTracker_artifacts/*.7z |