Update README.md download instruction #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
| name: .NET 8.0 Build, Publish, and Artifact Upload | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| tags: | |
| - 'v*.*.*' | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout Repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET 8.0 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '8.0.x' | |
| - name: Restore Dependencies | |
| run: dotnet restore GateSwitchWay.sln | |
| - name: Build Solution | |
| run: dotnet build GateSwitchWay.sln --configuration Release --no-restore | |
| - name: Publish Application | |
| run: dotnet publish GateSwitchWay.sln --configuration Release -r win-x64 --output publish | |
| - name: Install dotnet-warp | |
| run: dotnet tool install --global dotnet-warp | |
| - name: Get version and build executable | |
| run: | | |
| $version = $(git describe --tags --abbrev=0) -or "0.0.0" | |
| dotnet-warp GateSwitchWay.csproj --output GateSwitchWay-$version.exe | |
| shell: pwsh | |
| env: | |
| DOTNET_ROOT: C:\Program Files\dotnet | |
| - name: Upload Published Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: published-artifacts | |
| path: GateSwitchWay-*.exe |