fix performence #765
This file contains hidden or 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/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 .NET8 | |
| uses: actions/setup-dotnet@v4.3.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/ | |
| - name: Delete unused .xml files | |
| run: Remove-Item -Path ".\bin\githubActions\*.xml" -Force | |
| - name: Delete unused runtime subfolders | |
| shell: pwsh | |
| run: | | |
| $runtimePath = ".\bin\githubActions\runtimes" | |
| Get-ChildItem -Path $runtimePath -Directory | | |
| Where-Object { $_.Name -ne "win-x64" } | | |
| Remove-Item -Recurse -Force | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: OngekiFumenEditor_${{env.GitBuildVersion}}_${{env.Branch}}_(GABuild${{ steps.current-time.outputs.formattedTime }}_${{ steps.short-sha.outputs.sha }}_${{env.Configuration}}) | |
| path: C:\a\OngekiFumenEditor\OngekiFumenEditor\bin\githubActions | |