add guest stick banner, release held keys, and host end-session/test-… #36
Workflow file for this run
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: release | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| env: | |
| FORCE_JAVASCRIPT_ACTIONS_TO_NODE24: "true" | |
| DOTNET_SKIP_FIRST_TIME_EXPERIENCE: "1" | |
| DOTNET_CLI_TELEMETRY_OPTOUT: "1" | |
| jobs: | |
| release: | |
| runs-on: windows-latest | |
| defaults: | |
| run: | |
| shell: pwsh | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET 8 | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: "8.0.x" | |
| - name: Restore solution | |
| run: dotnet restore PassTheStick.sln | |
| - name: Build solution | |
| run: dotnet build PassTheStick.sln --configuration Release --no-restore | |
| - name: Publish launcher | |
| run: > | |
| dotnet publish src/PassTheStick.Launcher/PassTheStick.Launcher.csproj | |
| -c Release -r win-x64 --self-contained true | |
| -p:PublishSingleFile=true | |
| -p:EnableCompressionInSingleFile=true | |
| -o publish/app | |
| - name: Publish host | |
| run: > | |
| dotnet publish src/PassTheStick.Host/PassTheStick.Host.csproj | |
| -c Release -r win-x64 --self-contained true | |
| -p:PublishSingleFile=true | |
| -p:EnableCompressionInSingleFile=true | |
| -o publish/app | |
| - name: Publish guest | |
| run: > | |
| dotnet publish src/PassTheStick.Guest/PassTheStick.Guest.csproj | |
| -c Release -r win-x64 --self-contained true | |
| -p:PublishSingleFile=true | |
| -p:EnableCompressionInSingleFile=true | |
| -o publish/app | |
| - name: Bundle relay runtime (Node + ws) | |
| run: | | |
| $relayOut = "publish/app/relay" | |
| New-Item -ItemType Directory -Force $relayOut | Out-Null | |
| Copy-Item -Force src/PassTheStick.Relay/server.js $relayOut/ | |
| Copy-Item -Force src/PassTheStick.Relay/package.json $relayOut/ | |
| Push-Location src/PassTheStick.Relay | |
| npm install --omit=dev | |
| Pop-Location | |
| Copy-Item -Recurse -Force src/PassTheStick.Relay/node_modules $relayOut/ | |
| $nodeZip = "node-win-x64.zip" | |
| $nodeUrl = "https://nodejs.org/dist/v22.14.0/node-v22.14.0-win-x64.zip" | |
| Invoke-WebRequest -Uri $nodeUrl -OutFile $nodeZip | |
| Expand-Archive -Path $nodeZip -DestinationPath node-extract -Force | |
| Copy-Item -Force node-extract/node-v22.14.0-win-x64/node.exe $relayOut/node.exe | |
| - name: Package relay | |
| run: | | |
| New-Item -ItemType Directory -Force artifacts | Out-Null | |
| $relayFiles = @( | |
| "src/PassTheStick.Relay/server.js", | |
| "src/PassTheStick.Relay/Dockerfile", | |
| "src/PassTheStick.Relay/fly.toml", | |
| "src/PassTheStick.Relay/package.json" | |
| ) | |
| Compress-Archive -Path $relayFiles -DestinationPath artifacts/PassTheStick-relay.zip -Force | |
| - name: Build installer | |
| run: | | |
| $tag = "${{ github.ref_name }}" | |
| $ver = $tag.TrimStart('v') | |
| & "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DAppVersion=$ver installer/setup.iss | |
| - name: Upload release assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: ${{ github.ref_name }} | |
| files: | | |
| output/PassTheStick-Setup-*.exe | |
| artifacts/PassTheStick-relay.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |