update .net 7 #606
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
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/[email protected] | |
id: short-sha | |
with: | |
length: 6 | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
ref: ${{ env.Branch }} | |
submodules: recursive | |
- name: Setup .NET5 | |
uses: actions/setup-dotnet@v1 | |
with: | |
dotnet-version: 6.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 | |