v0.2.16 #17
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: Build Executables | |
| on: | |
| release: | |
| types: [published] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-release: | |
| runs-on: windows-latest | |
| steps: | |
| # Step 1: Checkout the repository | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| # Step 2: Set dotnet SDK | |
| - name: Setup dotnet SDK | |
| uses: actions/setup-dotnet@v3 | |
| with: | |
| dotnet-version: '8.x' | |
| # Step 3: Install dependencies | |
| - name: Install dependencies | |
| run: dotnet restore | |
| # Step 4: Build Executables | |
| - name: Build | |
| run: dotnet publish -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true | |
| # Step 5: Compress to zip | |
| - name: Compress to zip | |
| run: | | |
| mkdir -p XMLDiffAndPatch | |
| cp -r XMLPatch\bin\Release\net8.0\win-x64\publish\XMLPatch.exe XMLDiffAndPatch | |
| cp -r XMLDiff\bin\Release\net8.0\win-x64\publish\XMLDiff.exe XMLDiffAndPatch | |
| 7z a -tzip XMLDiffAndPatch.zip XMLDiffAndPatch | |
| shell: powershell | |
| # Step 6: Upload Diff and Patch Archive as Artifact | |
| - name: Upload Diff and Patch Archive as Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: executables-archive | |
| path: | | |
| XMLDiffAndPatch.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} | |
| # Step 7: Attach Windows Diff and Patch Archive to Release | |
| - name: Attach Windows Diff and Patch Archive to Release | |
| uses: softprops/action-gh-release@v2 | |
| if: ${{ github.event_name == 'release' }} | |
| with: | |
| files: XMLDiffAndPatch.zip | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} | |
| # Step 8: Scan with VirusTotal | |
| - | |
| name: VirusTotal Scan | |
| uses: crazy-max/ghaction-virustotal@v4 | |
| with: | |
| update_release_body: true | |
| vt_api_key: ${{ secrets.VT_API_KEY }} | |
| github_token: ${{ secrets.MY_RELEASE_PLEASE_TOKEN }} | |
| request_rate: 4 | |
| files: | | |
| ${{ github.event_name == 'release' && '.zip$' || '*.zip' }} |