Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions .github/workflows/release-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -215,3 +215,35 @@ jobs:
-w /go/src/llgo \
"${GORELEASER_CROSS_IMAGE}" \
release --clean --verbose --skip nfpm,snapcraft

notify-runtime-benchmark:
needs: release
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
permissions: {}
env:
BENCHMARKS_REPOSITORY: ${{ vars.BENCHMARKS_REPOSITORY || 'xgo-dev/benchmarks' }}
BENCHMARKS_DISPATCH_TOKEN: ${{ secrets.BENCHMARKS_DISPATCH_TOKEN }}
steps:
- name: Request a runtime benchmark for the released tag
run: |
set -euo pipefail
if [[ -z "$BENCHMARKS_DISPATCH_TOKEN" ]]; then
echo "BENCHMARKS_DISPATCH_TOKEN is not configured" >&2
exit 1
fi

payload="$(jq -cn \
--arg source_repository "$GITHUB_REPOSITORY" \
--arg llgo_repository "$GITHUB_REPOSITORY" \
--arg llgo_commit "$GITHUB_SHA" \
--arg llgo_tag "$GITHUB_REF_NAME" \
--arg source_run_url "https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}" \
'{event_type: "llgo-tag-released", client_payload: {source_repository: $source_repository, llgo_repository: $llgo_repository, llgo_commit: $llgo_commit, llgo_tag: $llgo_tag, source_run_url: $source_run_url}}')"

curl --fail-with-body --location --request POST \
--header 'Accept: application/vnd.github+json' \
--header "Authorization: Bearer ${BENCHMARKS_DISPATCH_TOKEN}" \
--header 'X-GitHub-Api-Version: 2022-11-28' \
"https://api.github.com/repos/${BENCHMARKS_REPOSITORY}/dispatches" \
--data "$payload"
Loading