added create pre-release option for manual builds (#33)

Signed-off-by: k4yt3x <i@k4yt3x.com>
pull/35/head
K4YT3X 3 years ago committed by GitHub
parent c97c3f9412
commit 1afad073bc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -4,7 +4,7 @@ name: dvmhost-build
on: on:
workflow_dispatch: workflow_dispatch:
inputs: inputs:
buildType: build_type:
description: "CMake Build Type" description: "CMake Build Type"
required: true required: true
default: "Release" default: "Release"
@ -14,10 +14,14 @@ on:
- Debug - Debug
- RelWithDebInfo - RelWithDebInfo
- MinSizeRel - MinSizeRel
stripSymbols: strip_symbols:
description: "Strip Symbols" description: "Strip Symbols"
required: false required: false
type: boolean type: boolean
create_pre_release:
description: "Create Pre-Release"
required: false
type: boolean
push: push:
branches: branches:
- master - master
@ -70,8 +74,8 @@ jobs:
run: | run: |
build_args='-DENABLE_TUI_SUPPORT=0' build_args='-DENABLE_TUI_SUPPORT=0'
if [[ "${{ github.event_name }}" == 'push' ]]; then if [[ "${{ github.event_name }}" == 'push' ]]; then
build_args="$build_args -DCMAKE_BUILD_TYPE=${{ inputs.buildType }}" build_args="$build_args -DCMAKE_BUILD_TYPE=${{ inputs.build_type }}"
if [[ "${{ inputs.stripSymbols }}" == 'true' ]]; then if [[ "${{ inputs.strip_symbols }}" == 'true' ]]; then
build_args="$build_args -DCMAKE_C_FLAGS='-s' -DCMAKE_CXX_FLAGS='-s'" build_args="$build_args -DCMAKE_C_FLAGS='-s' -DCMAKE_CXX_FLAGS='-s'"
fi fi
else else
@ -98,7 +102,7 @@ jobs:
path: ${{ env.PACKAGENAME }}.zip path: ${{ env.PACKAGENAME }}.zip
create-release: create-release:
if: ${{ github.event == 'push' }} if: ${{ github.event.inputs.create_pre_release == 'true' }}
name: Create Release name: Create Release
needs: [setup, build] needs: [setup, build]
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
@ -115,7 +119,7 @@ jobs:
prerelease: true prerelease: true
upload: upload:
if: ${{ github.event == 'push' }} if: ${{ github.event.inputs.create_pre_release == 'true' }}
name: Upload name: Upload
needs: [setup, build, create-release] needs: [setup, build, create-release]
strategy: strategy:

Loading…
Cancel
Save

Powered by TurnKey Linux.