Context
Part of the gh-gcs epic (#93).
fulll/gh-gcs needs a release workflow that downloads the pre-compiled binaries from a fulll/github-code-search release, renames them to match the gh extension naming convention, and publishes a new release.
Goal
Create .github/workflows/release.yml in fulll/gh-gcs with the following logic:
Trigger
on:
repository_dispatch:
types: [new-release]
workflow_dispatch:
inputs:
version:
description: "Version tag (e.g. v1.8.1)"
required: true
Steps
- Determine the version (
github.event.client_payload.version or inputs.version)
- Download all binaries from
fulll/github-code-search@<version> using gh release download
- Rename each asset according to the mapping:
| Downloaded |
Renamed to |
github-code-search-linux-x64 |
gh-gcs-linux-amd64 |
github-code-search-linux-arm64 |
gh-gcs-linux-arm64 |
github-code-search-macos-x64 |
gh-gcs-darwin-amd64 |
github-code-search-macos-arm64 |
gh-gcs-darwin-arm64 |
github-code-search-windows-x64.exe |
gh-gcs-windows-amd64.exe |
- Create a release
<version> in fulll/gh-gcs with gh release create and attach all renamed binaries
- Use
generate_release_notes: false and copy the body from the source release
Permissions required
GH_TOKEN with contents: write on fulll/gh-gcs
- Read access to
fulll/github-code-search releases (public repo, no extra token needed)
Acceptance criteria
Context
Part of the
gh-gcsepic (#93).fulll/gh-gcsneeds a release workflow that downloads the pre-compiled binaries from afulll/github-code-searchrelease, renames them to match theghextension naming convention, and publishes a new release.Goal
Create
.github/workflows/release.ymlinfulll/gh-gcswith the following logic:Trigger
Steps
github.event.client_payload.versionorinputs.version)fulll/github-code-search@<version>usinggh release downloadgithub-code-search-linux-x64gh-gcs-linux-amd64github-code-search-linux-arm64gh-gcs-linux-arm64github-code-search-macos-x64gh-gcs-darwin-amd64github-code-search-macos-arm64gh-gcs-darwin-arm64github-code-search-windows-x64.exegh-gcs-windows-amd64.exe<version>infulll/gh-gcswithgh release createand attach all renamed binariesgenerate_release_notes: falseand copy the body from the source releasePermissions required
GH_TOKENwithcontents: writeonfulll/gh-gcsfulll/github-code-searchreleases (public repo, no extra token needed)Acceptance criteria
workflow_dispatch) for any existing versiongh-gcs-<os>-<arch>convention exactlygh extension install fulll/gh-gcsresolves and installs the correct binary on each supported platformgh extension upgrade gh-gcspicks up the new release