ci: trigger release binaries for latest tag #1
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: Trigger Release Binaries | |
| on: | |
| push: | |
| branches: | |
| - trigger-release-binaries-latest-tag | |
| permissions: | |
| actions: write | |
| contents: read | |
| jobs: | |
| trigger: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout tags | |
| uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| with: | |
| fetch-depth: 0 | |
| - name: Resolve latest tag | |
| id: tag | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| git fetch --tags --force | |
| TAG="$( | |
| git tag --list 'v*' --sort=-v:refname \ | |
| | grep -E '^v[0-9]+\.[0-9]+\.[0-9]+(-[A-Za-z0-9.+-]+)?$' \ | |
| | head -n 1 | |
| )" | |
| if [[ -z "${TAG}" ]]; then | |
| echo "::error::No SemVer-style v* tag found" | |
| exit 1 | |
| fi | |
| echo "tag=${TAG}" >> "$GITHUB_OUTPUT" | |
| echo "Resolved release tag: ${TAG}" | |
| - name: Trigger release-binaries.yaml | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| TAG: ${{ steps.tag.outputs.tag }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| gh workflow run release-binaries.yaml --ref main --field tag="${TAG}" |