Update tag prefix and previous tag format in workflow #14
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
| # This workflow uses actions that are not certified by GitHub. | |
| # They are provided by a third-party and are governed by | |
| # separate terms of service, privacy policy, and support | |
| # documentation. | |
| name: Build and Release | |
| on: | |
| push: | |
| branches: [ "master" ] | |
| pull_request: | |
| branches: [ "master" ] | |
| jobs: | |
| build: | |
| strategy: | |
| matrix: | |
| arch: [x64, x86, ARM64] | |
| runs-on: windows-latest # For a list of available runner types, refer to | |
| # https://help.github.com/en/actions/reference/workflow-syntax-for-github-actions#jobsjob_idruns-on | |
| env: | |
| Solution_Name: SummaSQLGame.sln # Replace with your solution name, i.e. MyWpfApp.sln. | |
| Test_Project_Path: SummaSQLGame\SummaSQLGameTests\SummaSQLGameTests.csproj # Replace with the path to your test project, i.e. MyWpfApp.Tests\MyWpfApp.Tests.csproj. | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| # Install the .NET Core workload | |
| - name: Install .NET Core | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 9.0.x | |
| # Add MSBuild to the PATH: https://github.com/microsoft/setup-msbuild | |
| - name: Setup MSBuild.exe | |
| uses: microsoft/setup-msbuild@v2 | |
| - name: Setup NuGet | |
| uses: NuGet/setup-nuget@v2 | |
| # Execute all unit tests in the solution | |
| - name: Execute unit tests | |
| run: dotnet test -v q | |
| - name: Build solutions | |
| run: msbuild D:\a\SQLGame\SQLGame\SummaSQLGame\SummaSQLGame.csproj /p:Configuration=Release /p:Platform=${{ matrix.arch }} | |
| - name: Create artifact folder | |
| run: | | |
| mkdir output | |
| xcopy /s /y /i "D:\a\SQLGame\SQLGame\SummaSQLGame\bin\${{ matrix.arch }}\Release" "output\${{ matrix.arch }}" | |
| - name: Zip build output | |
| run: | | |
| powershell Compress-Archive -Path "output\${{ matrix.arch }}\*" -DestinationPath "${{ github.workspace }}\${{ matrix.arch }}.zip" | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: build-${{ matrix.arch }} | |
| path: ${{ github.workspace }}/${{ matrix.arch }}.zip | |
| release: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| path: artifacts | |
| - name: Auto Generate Next Release Tag | |
| # You may pin to the exact commit or the version. | |
| # uses: amitsingh-007/next-release-tag@43666cc7d412293e514756c2796dcba08c678369 | |
| uses: amitsingh-007/next-release-tag@v6.3.0 | |
| with: | |
| # Github secrets token | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| # Prefix added to the generated release tag; supports an optional * wildcard only at the end for prefix matching | |
| tag_prefix: 'v-*' | |
| tag_template: 'yyyy.mm.dd.i' | |
| previous_tag: 'v-2025.09.15.1' | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: | | |
| artifacts/build-x64/*.zip | |
| artifacts/build-x86/*.zip | |
| artifacts/build-ARM64/*.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| # - name: .Net Build x64 | |
| # # You may pin to the exact commit or the version. | |
| # # uses: EasyDesk/action-dotnet-build@d2c47d8701e3ea8db03dcabaacb37204fe123a22 | |
| # uses: EasyDesk/action-dotnet-build@v1.0.0 | |
| # with: | |
| # # Additional build arguments to pass to 'dotnet build'. | |
| # build-args: --arch x64 | |
| # Upload the MSIX package: https://github.com/marketplace/actions/upload-a-build-artifact | |
| # - name: Upload build artifacts | |
| # uses: actions/upload-artifact@v4 | |
| # with: | |
| # name: MSIX Package | |
| # path: ${{ env.Wap_Project_Directory }}\AppPackages |