Update README.md #2
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 Docker Server Launcher | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| # Step 1: Checkout the repository | |
| - name: Checkout Code | |
| uses: actions/checkout@v3 | |
| # Step 2: Set up .NET SDK | |
| - name: Set up .NET SDK | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: 7.0.x # Replace with the desired .NET version | |
| # Step 3: Create a temporary project to compile the .cs file | |
| - name: Create Temporary Project | |
| run: | | |
| mkdir temp | |
| dotnet new console --output temp --name docker-server-launcher | |
| mv ./docker-server-launcher.cs ./temp/Program.cs | |
| # Step 4: Compile to a self-contained Windows executable | |
| - name: Build Executable | |
| run: | | |
| dotnet publish ./temp/docker-server-launcher.csproj ` | |
| -r win-x64 ` | |
| --self-contained true ` | |
| /p:OutputType=WinExe ` | |
| /p:Configuration=Release ` | |
| -o ./output | |
| # Step 5: Archive the executable as a repository artifact | |
| - name: Archive Build Output | |
| uses: actions/upload-artifact@v3 | |
| with: | |
| name: vanderstack-docker-server | |
| path: ./output |