Skip to content

add #if to protect usings in build configure Release #615

add #if to protect usings in build configure Release

add #if to protect usings in build configure Release #615

Workflow file for this run

name: Build Program
on:
push:
workflow_dispatch:
inputs:
BuildBranch:
description: 'The branch you want to build.'
required: true
default: 'master'
BuildConfiguration:
description: 'The configuration for dotnet build.'
required: true
default: 'Release'
type: choice
options:
- Release
- Debug
env:
Configuration: ${{ github.event.inputs.BuildConfiguration || 'Release' }}
Branch: ${{ github.event.inputs.BuildBranch || github.ref_name }}
jobs:
build:
runs-on: windows-latest
steps:
- name: Get current time
uses: josStorer/get-current-time@v2
id: current-time
with:
format: YYYYMMDDHHMMSS
utcOffset: "+08:00"
- uses: benjlevesque/short-sha@v2.2
id: short-sha
with:
length: 6
- uses: actions/checkout@v2
with:
fetch-depth: 0
ref: ${{ env.Branch }}
submodules: recursive
- name: Setup .NET7
uses: actions/setup-dotnet@v4.0.1
with:
dotnet-version: 8.0.x
- name: get-version-action
id: project-version
uses: euberdeveloper/ga-project-version@main
with:
path: .\OngekiFumenEditor\version.json
- name: Restore dependencies
run: dotnet restore
- name: Publish
run: dotnet publish .\OngekiFumenEditor\OngekiFumenEditor.csproj --no-restore -c ${{env.Configuration}} -o ./bin/githubActions/
- uses: actions/upload-artifact@v3
with:
name: OngekiFumenEditor_${{steps.project-version.outputs.version}}_${{env.Branch}}_(GABuild${{ steps.current-time.outputs.formattedTime }}_${{ steps.short-sha.outputs.sha }}_${{env.Configuration}})
path: D:\a\OngekiFumenEditor\OngekiFumenEditor\bin\githubActions