-
Notifications
You must be signed in to change notification settings - Fork 112
Automatically sign CLI binary using Goreleaser #3879
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
6 failing tests:
|
| with: | ||
| packages-dir: experimental/python/dist | ||
|
|
||
| publish-to-winget-pkgs: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This action moved from publish-winget.yml which was previously manually triggered, now it triggered automatically after goreleaser succeeds.
| urls=$( | ||
| gh api https://api.github.com/repos/databricks/cli/releases/tags/${{ github.ref_name }} | \ | ||
| jq -r .assets[].browser_download_url | \ | ||
| grep -E '_windows_.*\.zip$' | \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The only change it used to search for -signed suffixed archives, but nowthe default named archive for windows is already signed
| -p ${{ secrets.DECO_SIGN_AZURE_CLIENT_SECRET }} \ | ||
| --tenant ${{ secrets.DECO_SIGN_AZURE_TENANT_ID }} | ||
| ACCESS_TOKEN=$(az account get-access-token --resource https://vault.azure.net --query accessToken -o tsv) | ||
| echo "ACCESS_TOKEN=$ACCESS_TOKEN" >> $GITHUB_ENV |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We need to mark this as secret/sensitive as well.
| hooks: | ||
| post: | ||
| - sh -c 'if [ "{{ .Os }}" = "windows" ]; then java -jar /tmp/jsign.jar --storetype AZUREKEYVAULT --keystore "${AZURE_KEY_VAULT_NAME}" --storepass "${ACCESS_TOKEN}" --alias "${AZURE_CERTIFICATE_NAME}" --tsaurl http://timestamp.digicert.com "{{ .Path }}"; fi' | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks a bit finicky. Is this the recommended approach with goreleaser?
Changes
Automatically sign CLI binary using Goreleaser
Why
Currently, it's a manual process; we want it to be automatic
Tests
Successful dry-run is here: https://github.com/databricks/cli/actions/runs/19235669891/job/54984805490