-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Description
Describe the bug
With the v2 major release of cli/gh-extension-precompile addressing build issues with more recent Go releases on Android in cli/gh-extension-precompile#56, the release workflow templates used by gh ext create should be updated as the v1 version causes Go extensions to break.
$ gh --version
gh version 2.62.0 (2024-11-14)
https://github.com/cli/cli/releases/tag/v2.62.0cli/pkg/cmd/extension/ext_tmpls/goBinWorkflow.yml
Lines 11 to 19 in a50fc70
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cli/gh-extension-precompile@v1 | |
| with: | |
| generate_attestations: true | |
| go_version_file: go.mod |
cli/pkg/cmd/extension/ext_tmpls/otherBinWorkflow.yml
Lines 9 to 16 in a50fc70
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: cli/gh-extension-precompile@v1 | |
| with: | |
| build_script_override: "script/build.sh" |
Steps to reproduce the behavior
-
Create standard Go extension
gh ext create --precompiled=go foobar
-
Create repository based on local repository
cd gh-foobar gh repo create gh-acceptance-testing/gh-foorbar --private --push --source .
-
Create release
gh release create v0.0.1 --title v0.0.1 --generate-notes
-
Confirm release workflow fails due to Android CGO
gh run view "$(gh run list --json databaseId --jq '.[0].databaseId')" --log-failedresulting in:
android/amd64 requires external (cgo) linking, but cgo is not enabled Error: Process completed with exit code 1.
Expected vs actual behavior
I expect newly created extensions to be releasable from an unmodified standard release workflow with current Go releases.