diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml new file mode 100644 index 0000000..2fe6e1f --- /dev/null +++ b/.github/workflows/build-windows.yml @@ -0,0 +1,40 @@ +name: Build Windows Binary + +on: + push: + branches: [ master, main ] + pull_request: + branches: [ master, main ] + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + permissions: + contents: read + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '8.0.x' + + - name: Restore dependencies + run: dotnet restore + + - name: Build + run: dotnet build --configuration Release --no-restore + + - name: Publish + run: dotnet publish --configuration Release --no-build --runtime win-x64 --self-contained --output ./publish + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: FolderSnippets-Windows + path: ./publish/FolderSnippets.exe + retention-days: 1 + overwrite: true