This repository has been archived by the owner on Jul 16, 2024. It is now read-only.
Upload Asset - Windows #24
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
on: | |
push: | |
# Sequence of patterns matched against refs/tags | |
tags: | |
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10 | |
name: Upload Asset - Windows | |
jobs: | |
build: | |
name: Upload Asset - Windows | |
runs-on: windows-latest | |
strategy: | |
matrix: | |
configuration: ['release'] #, 'debug'] | |
platform: ['x64', 'win32', 'aarch64'] | |
steps: | |
- uses: actions/[email protected] | |
with: | |
submodules: 'true' | |
fetch-depth: '0' | |
# Build from the tag that triggered the build | |
ref: ${{github.ref_name}} | |
- name: setup-msbuild | |
uses: microsoft/setup-msbuild@v1 | |
- name: premake | |
run: | |
.\premake.bat vs2019 --deps=true --no-progress=true | |
- name: msbuild | |
run: | |
MSBuild.exe slang-glslang.sln -v:m -m -property:Configuration=${{matrix.configuration}} -property:Platform=${{matrix.platform}} -property:WindowsTargetPlatformVersion=10.0.19041.0 | |
- name: archive | |
id: archive | |
run: | | |
echo "achiving files..." | |
$tagName = & git describe --tags | |
$glslangVersion = $tagName.TrimStart("v") | |
$binArchive = "slang-glslang-$glslangVersion-windows-${{matrix.platform}}-${{matrix.configuration}}.zip" | |
echo "name=BINARY_ARCHIVE::$binArchive" | |
echo "::set-output name=BINARY_ARCHIVE::$binArchive" | |
7z a "$binArchive" README.md | |
7z a "$binArchive" LICENSE | |
7z a "$binArchive" bin\*\*\*.dll | |
- name: Check outputs | |
shell: pwsh | |
run: echo "binary is ${{ steps.archive.outputs.BINARY_ARCHIVE }}" | |
- name: UploadBinary | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
${{ steps.archive.outputs.BINARY_ARCHIVE }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |