From: Soeren Apel Date: Sat, 24 Aug 2024 18:25:35 +0000 (+0200) Subject: build.yml: Make sigrok-cli post artifact URL for PRs X-Git-Url: https://sigrok.org/gitaction?a=commitdiff_plain;h=70f58ab8c80ea49e62f4af9bb0347cb3b559e1e7;p=sigrok-build.git build.yml: Make sigrok-cli post artifact URL for PRs --- diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e03ffea..312786c 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -385,11 +385,34 @@ jobs: mv sigrok-cli-*.AppImage sigrok-cli-NIGHTLY-${{ matrix.target.target }}-debug.appimage - name: Upload artifact - uses: actions/upload-artifact@v3 + id: upload_sigrok-cli_appimage_artifact + uses: actions/upload-artifact@v4 with: name: artifact-sigrok-cli-x86_64-appimage path: sigrok-build/ci/appimage/appimage-build/sigrok-cli-*.appimage + - name: Output artifact URL + # Only relevant for pull requests + if: (github.event_name == 'pull_request') + run: | + echo 'Artifact URL is ${{ steps.upload_sigrok-cli_appimage_artifact.outputs.artifact-url }}' + + - name: Add artifact message to pull request + # Only relevant for pull requests + if: (github.event_name == 'pull_request') + uses: actions/github-script@v7 + env: + PR_NOTES: | + sigrok-cli AppImage created: ${{ steps.upload_sigrok-cli_appimage_artifact.outputs.artifact-url }} + with: + script: | + github.rest.issues.createComment({ + issue_number: ${{ github.event.pull_request.number }} + owner: context.repo.owner, + repo: context.repo.repo, + body: process.env.PR_NOTES + }) + build_pulseview_macos: name: PulseView macOS build