Build sharp-vless.exe #31
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 sharp-vless.exe | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| jobs: | |
| build-windows: | |
| name: Build Windows EXE | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET 6 | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '6.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore VlessClientApp.csproj | |
| - name: Publish Self-Contained Win-x64 | |
| run: dotnet publish VlessClientApp.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -o ./publish | |
| - name: Zip Artifact | |
| run: Compress-Archive -Path "./publish/*" -DestinationPath "sharp-vless-windows-x64.zip" | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: sharp-vless-windows-x64 | |
| path: sharp-vless-windows-x64.zip | |
| retention-days: 30 | |
| - name: Upload to GitHub Release | |
| if: github.event_name == 'release' | |
| uses: svenstaro/upload-release-action@v2 | |
| with: | |
| repo_token: ${{ secrets.GITHUB_TOKEN }} | |
| file: sharp-vless-windows-x64.zip | |
| asset_name: sharp-vless-windows-x64.zip | |
| tag: ${{ github.ref }} | |
| overwrite: true |