Skip to content

Release v0.0.1

Release v0.0.1 #11

Workflow file for this run

name: Release
run-name: Release ${{ github.ref_name }}
permissions: write-all
on:
push:
tags:
- 'v*'
jobs:
build-release:
name: Build Release
uses: ./.github/workflows/build.yaml
with:
cmake-preset: x86-release
upload-artifact-dll: release-dll
upload-artifact-vdf: release-vdf
project-version: ${{ github.ref_name }}
build-relwithdebinfo:
name: Build RelWithDebInfo
uses: ./.github/workflows/build.yaml
with:
cmake-preset: x86-relwithdebinfo
upload-artifact-dll: relwithdebinfo-dll
upload-artifact-vdf: relwithdebinfo-vdf
project-version: ${{ github.ref_name }}
build-minsizerel:
name: Build MinSizeRel
uses: ./.github/workflows/build.yaml
with:
cmake-preset: x86-minsizerel
upload-artifact-dll: minsizerel-dll
upload-artifact-vdf: minsizerel-vdf
project-version: ${{ github.ref_name }}
publish:
name: Publish Release
runs-on: windows-2022
needs:
- build-release
- build-relwithdebinfo
- build-minsizerel
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
- name: Download Release DLL
uses: actions/download-artifact@v4
with:
name: release-dll
path: out/install/x86-release/
- name: Download Release VDF
uses: actions/download-artifact@v4
with:
name: release-vdf
path: out/install/x86-release/
- name: Download RelWithDebInfo DLL
uses: actions/download-artifact@v4
with:
name: relwithdebinfo-dll
path: out/install/x86-relwithdebinfo/
- name: Download RelWithDebInfo VDF
uses: actions/download-artifact@v4
with:
name: relwithdebinfo-vdf
path: out/install/x86-relwithdebinfo/
- name: Download MinSizeRel DLL
uses: actions/download-artifact@v4
with:
name: minsizerel-dll
path: out/install/x86-minsizerel/
- name: Download MinSizeRel VDF
uses: actions/download-artifact@v4
with:
name: minsizerel-vdf
path: out/install/x86-minsizerel/
- name: Prepare Release Files
id: prepare-release
shell: powershell
env:
GITHUB_REF: ${{ github.ref_name }}
run: |
tree /F
$project = (Get-Content -Path Configuration.cmake | Select-String -Pattern "PROJECT_NAME `"([^`"]+)`"").Matches[0].Groups[1].Value
$tag = $env:GITHUB_REF -replace '^refs/tags/', ''
$files = Get-ChildItem -Path out/install/x86-release/ -Exclude *.vdf
Compress-Archive $files $project-${tag}.zip
Copy-Item out/install/x86-release/$project.vdf $project-${tag}.vdf
$files = Get-ChildItem -Path out/install/x86-relwithdebinfo/ -Exclude *.vdf
Compress-Archive $files $project-${tag}-RelWithDebInfo.zip
Copy-Item out/install/x86-relwithdebinfo/*.vdf $project-${tag}-RelWithDebInfo.vdf
$files = Get-ChildItem -Path out/install/x86-minsizerel/ -Exclude *.vdf
Compress-Archive $files $project-${tag}-MinSizeRel.zip
Copy-Item out/install/x86-minsizerel/$project.vdf $project-${tag}-MinSizeRel.vdf
$prerelease = if (-not ($tag -match '^v?(\d+\.\d+\.\d+)$')) { 'true' } else { 'false' }
echo "prerelease=${prerelease}" >> $env:GITHUB_OUTPUT
- name: Release
uses: softprops/action-gh-release@v2
with:
token: ${{ github.token }}
generate_release_notes: true
fail_on_unmatched_files: false
draft: false
prerelease: ${{ steps.prepare-release.outputs.prerelease }}
files: |
*.zip
*.vdf