Skip to content

Release Build

Release Build #19

Workflow file for this run

name: "Release Build"
on:
release:
types: [published]
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
build-type: [Release] # [Debug, DevBuild, Release]
is-cncnet-yr: ["", -CnCNetYR]
is-hardened: ["", -Hardened]
env:
BUILD_CONFIG: ${{ matrix.build-type }}${{ matrix.is-cncnet-yr }}${{ matrix.is-hardened }}
ARCHIVE_NAME: CnCNet-Spawner${{ matrix.is-cncnet-yr }}${{ matrix.is-hardened }}-${{ github.ref_name }}.zip
steps:
- uses: actions/checkout@v4
with:
submodules: recursive
ssh-key: ${{ secrets.CNCNET_CI_SSH_PRIVATEKEY }}
- name: Build
uses: ./.github/actions/build
with:
build-config: ${{ env.BUILD_CONFIG }}
- name: Create an Archive for the Release
run: >
7z a ${{ env.ARCHIVE_NAME }}
./LICENSE.md
./${{ env.BUILD_CONFIG }}/CnCNet-Spawner.dll
${{!contains(env.BUILD_CONFIG, 'Hardened') && format('./{0}/CnCNet-Spawner.pdb', env.BUILD_CONFIG) || ''}}
- name: Upload Files to the Release
uses: softprops/action-gh-release@v2
with:
append_body: true
files: ${{ env.ARCHIVE_NAME }}