More diagnostics #10
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 and Upload to Buildbot | |
| on: | |
| push: | |
| tags: | |
| - "v*" # Only run when pushing tags that start with 'v' | |
| jobs: | |
| build: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET 9 SDK | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: '9.0.x' | |
| - name: Restore dependencies | |
| run: dotnet restore | |
| - name: Publish .NET 9 Desktop App | |
| run: dotnet publish --configuration Release -o publish | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ github.event.repository.name }} | |
| path: publish/** | |
| - name: Get artifact metadata | |
| id: get_artifact | |
| shell: bash | |
| run: | | |
| # Get artifacts for this run | |
| response=$(curl -s -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" \ | |
| https://api.github.com/repos/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts) | |
| artifact_id=$(echo "$response" | jq -r '.artifacts[0].id') | |
| artifact_name=$(echo "$response" | jq -r '.artifacts[0].name') | |
| artifact_url=$(echo "$response" | jq -r ".artifacts[] | select(.id==$artifact_id) | .archive_download_url") | |
| echo "file=$artifact_name.zip" >> $GITHUB_OUTPUT | |
| echo "url=$artifact_url" >> $GITHUB_OUTPUT | |
| - name: Send webhook | |
| shell: bash | |
| run: | | |
| payload=$(jq -n \ | |
| --arg fileName "${{ steps.get_artifact.outputs.file }}" \ | |
| --arg url "${{ steps.get_artifact.outputs.url }}" \ | |
| --arg projectName "${{ github.event.repository.name }}" \ | |
| --arg branch "${{ github.ref_name }}" \ | |
| --arg buildVersion "${{ github.ref_name }}" \ | |
| '{ | |
| artifacts: [ | |
| { | |
| fileName: $fileName, | |
| url: $url | |
| } | |
| ], | |
| environmentVariables: { | |
| appveyor_project_name: $projectName, | |
| appveyor_repo_branch: $branch, | |
| appveyor_build_version: $buildVersion | |
| } | |
| }') | |
| curl -X POST "${{ secrets.WEBHOOK_URL }}" \ | |
| -H "Content-Type: application/json" \ | |
| -H "X-GitHub-Token: ${{ secrets.GITHUB_TOKEN }}" \ | |
| -d "$payload" |