Skip to content

Updated gh action (release.yml) #11

Updated gh action (release.yml)

Updated gh action (release.yml) #11

Workflow file for this run

name: Build and Release on Tag
on:
push:
tags:
- v*
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up MSVC environment
uses: microsoft/setup-msbuild@v2
- name: Build
run: |
cmake -A Win32 -B build -S . -D CMAKE_BUILD_TYPE=Debug
cmake --build build --config Debug
cmake -A Win32 -B build -S . -D CMAKE_BUILD_TYPE=Release
cmake --build build --config Release
- name: Archive Debug Binaries
run: |
mkdir DCE-DEBUG-x86
cp "build/DiscCheckEmuAPIHook/Debug/DCEAPIHook.dll" DCE-DEBUG-x86/
cp "build/DiscCheckEmuLoader/Debug/DCELoader.exe" DCE-DEBUG-x86/
cp "DCEConfig_TEMPLATE.yaml" DCE-DEBUG-x86/DCEConfig.yaml
cp "README.md" DCE-DEBUG-x86/README.txt
cp "CHANGELOG.md" DCE-DEBUG-x86/CHANGELOG.txt
Compress-Archive -Path "DCE-DEBUG-x86/*" -DestinationPath DiscCheckEmu-${{ github.ref_name }}-DEBUG-x86.zip
- name: Archive Release Binaries
run: |
mkdir DCE-x86
cp "build/DiscCheckEmuAPIHook/Release/DCEAPIHook.dll" DCE-x86/
cp "build/DiscCheckEmuLoader/Release/DCELoader.exe" DCE-x86/
cp "DCEConfig_TEMPLATE.yaml" DCE-x86/DCEConfig.yaml
cp "README.md" DCE-x86/README.txt
cp "CHANGELOG.md" DCE-x86/CHANGELOG.txt
Compress-Archive -Path "DCE-x86/*" -DestinationPath DiscCheckEmu-${{ github.ref_name }}-x86.zip
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
DiscCheckEmu-${{ github.ref_name }}-DEBUG-x86.zip
DiscCheckEmu-${{ github.ref_name }}-x86.zip