Files
go-telegram/workflow-prepare.sh
T
lukaszraczyloandGitHub 93ebf41a3c ci: use the shared pull request, release and autoupdate workflows (#19)
* ci(workflows): migrate to shared go-pr and go-release workflows

Replace the generic vet, staticcheck, govulncheck, gosec, test and release jobs with the shared go-pr and go-release workflows.
Keep the codegen-clean and audit jobs in ci.yml. Add an examples build job and the ci-success aggregator there.
Add autoupdate.yaml from the shared go-autoupdate workflow.
The release job now runs only on Go source changes and on manual dispatch.
The dry-run input and the Bot API note in the tag message no longer exist.

* ci(release): gate release on repo checks and export Bot API version

Move the codegen-clean, audit and examples jobs into the reusable checks.yml workflow. The ci.yml and release.yml workflows both call it.
The release job now needs the checks job. A failed or cancelled check blocks the release.
Add workflow-prepare.sh. It appends BOT_API_VERSION to GITHUB_ENV so the GoReleaser header shows the Bot API version.
The script does nothing when GITHUB_ENV is unset.

* ci(regen): name release.yml in the merge step comments

The release now runs from release.yml. The comments still named ci.yml as the workflow that cuts the release.
2026-10-02 04:42:00 +01:00

12 lines
340 B
Bash
Executable File

#!/usr/bin/env bash
# Exports BOT_API_VERSION for the .goreleaser.yaml release header.
set -euo pipefail
[ -n "${GITHUB_ENV:-}" ] || exit 0
ver=$(python3 -c 'import json; print(json.load(open("internal/spec/api.json"))["version"])')
if [ -z "$ver" ] || [ "$ver" = "null" ]; then
exit 0
fi
echo "BOT_API_VERSION=${ver}" >> "$GITHUB_ENV"