From de4734806d9db0ed0f05dc6d092ac0087e507258 Mon Sep 17 00:00:00 2001 From: tais <378873+tais@users.noreply.github.com> Date: Sun, 5 Oct 2025 12:40:19 +0200 Subject: [PATCH] Add github workflow configuration to build this project --- .github/workflows/build-and-release.yml | 41 +++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 .github/workflows/build-and-release.yml diff --git a/.github/workflows/build-and-release.yml b/.github/workflows/build-and-release.yml new file mode 100644 index 0000000..928bdd0 --- /dev/null +++ b/.github/workflows/build-and-release.yml @@ -0,0 +1,41 @@ +name: Build and Release + +on: + push: + tags: + - 'v*.*.*' # Triggers on version tags like v1.0.0 + workflow_dispatch: # Allows manual trigger + +jobs: + build-and-release: + runs-on: windows-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: '9.0.x' + + - name: Restore dependencies + run: dotnet restore XMLEditor_VS2010.sln + + - name: Build solution + run: dotnet build XMLEditor_VS2010.sln --configuration Release --no-restore + + - name: Publish GUI project + run: dotnet publish GUI/GUI.vbproj --configuration Release --no-build --output ./publish + + - name: Create release archive + run: Compress-Archive -Path ./publish/* -DestinationPath XMLEditor-Release.zip + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: XMLEditor-Release.zip + generate_release_notes: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}