Skip to content

feat: tokn release + binaries CI#69

Open
KooshaPari wants to merge 2 commits into
mainfrom
feat/tokn-release
Open

feat: tokn release + binaries CI#69
KooshaPari wants to merge 2 commits into
mainfrom
feat/tokn-release

Conversation

@KooshaPari

@KooshaPari KooshaPari commented Jun 27, 2026

Copy link
Copy Markdown
Owner

User description

release.yml + binaries.yml (matrix GH-release binaries) for the Tokn ledger CLI.


CodeAnt-AI Description

Release builds now publish binaries from tags and docs load correctly on custom domains

What Changed

  • Releases now run when a v* tag is pushed, and they publish the CLI binaries as release assets for Linux, macOS, and Windows.
  • The release flow no longer runs the old publish-and-promote steps on branch commits.
  • Docs now choose the correct site path for GitHub Pages, custom domains, or an explicitly set docs base path, so styles and assets load from the right location.

Impact

✅ Easier tagged releases
✅ Downloadable CLI binaries on release pages
✅ Fewer broken docs assets on custom domains

💡 Usage Guide

Checking Your Pull Request

Every time you make a pull request, our system automatically looks through it. We check for security issues, mistakes in how you're setting up your infrastructure, and common code problems. We do this to make sure your changes are solid and won't cause any trouble later.

Talking to CodeAnt AI

Got a question or need a hand with something in your pull request? You can easily get in touch with CodeAnt AI right here. Just type the following in a comment on your pull request, and replace "Your question here" with whatever you want to ask:

@codeant-ai ask: Your question here

This lets you have a chat with CodeAnt AI about your pull request, making it easier to understand and improve your code.

Example

@codeant-ai ask: Can you suggest a safer alternative to storing this secret?

Preserve Org Learnings with CodeAnt

You can record team preferences so CodeAnt AI applies them in future reviews. Reply directly to the specific CodeAnt AI suggestion (in the same thread) and replace "Your feedback here" with your input:

@codeant-ai: Your feedback here

This helps CodeAnt AI learn and adapt to your team's coding style and standards.

Example

@codeant-ai: Do not flag unused imports.

Retrigger review

Ask CodeAnt AI to review the PR again, by typing:

@codeant-ai: review

Check Your Repository Health

To analyze the health of your code repository, visit our dashboard at https://app.codeant.ai. This tool helps you identify potential issues and areas for improvement in your codebase, ensuring your repository maintains high standards of code health.

KooshaPari and others added 2 commits June 26, 2026 18:12
Only apply repo subpath base when GITHUB_PAGES is set; default to `/` so Cloudflare subdomain builds resolve CSS from `/assets/`.

Co-authored-by: Cursor <cursoragent@cursor.com>
@gemini-code-assist

Copy link
Copy Markdown

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@codeant-ai

codeant-ai Bot commented Jun 27, 2026

Copy link
Copy Markdown

CodeAnt AI is reviewing your PR.

@codeant-ai

codeant-ai Bot commented Jun 27, 2026

Copy link
Copy Markdown

Thanks for using CodeAnt! 🎉

We're free for open-source projects. if you're enjoying it, help us grow by sharing.

Share on X ·
Reddit ·
LinkedIn

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: cargo hyper-util is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?cargo/reqwest@0.13.4cargo/hyper-util@0.1.20

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore cargo/hyper-util@0.1.20. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: cargo libc is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?cargo/tempfile@3.27.0cargo/tokio@1.52.3cargo/reqwest@0.13.4cargo/chrono@0.4.45cargo/libc@0.2.186

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore cargo/libc@0.2.186. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: cargo tokio is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: Cargo.lockcargo/tokio@1.52.3

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore cargo/tokio@1.52.3. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
License policy violation: cargo webpki-root-certs under CDLA-Permissive-2.0

License: CDLA-Permissive-2.0 - The applicable license policy does not permit this license (5) (webpki-root-certs-1.0.8/Cargo.toml)

License: CDLA-Permissive-2.0 - The applicable license policy does not permit this license (5) (webpki-root-certs-1.0.8/LICENSE)

From: ?cargo/reqwest@0.13.4cargo/webpki-root-certs@1.0.8

ℹ Read more on: This package | This alert | What is a license policy violation?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Find a package that does not violate your license policy or adjust your policy to allow this package's license.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore cargo/webpki-root-certs@1.0.8. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: cargo writeable is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?cargo/reqwest@0.13.4cargo/writeable@0.6.3

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore cargo/writeable@0.6.3. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: cargo zerocopy is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: ?cargo/reqwest@0.13.4cargo/zerocopy@0.8.52

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore cargo/zerocopy@0.8.52. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@codeant-ai codeant-ai Bot added the size:M This PR changes 30-99 lines, ignoring generated files label Jun 27, 2026
Comment thread docs/.vitepress/config.ts
const name = repo.split('/')[1]
return `/${name}/`
}
if (process.env.PHENOTYPE_CUSTOM_DOMAIN === 'true') return '/'

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion: The custom-domain detection is tied to PHENOTYPE_CUSTOM_DOMAIN, which appears to be a copy-paste variable name unrelated to this repo and is not set anywhere else. This makes the custom-domain branch effectively unreachable, so GitHub Pages builds with a custom domain can incorrectly use a /{repo}/ base and produce broken asset/doc links. Use the correct project-specific env var (or a generic one consistently used by your workflows) for this check. [inconsistent naming]

Severity Level: Major ⚠️
❌ GitHub Pages custom-domain docs served with incorrect base path.
❌ VitePress-generated links resolve under `/{repo}/` breaking navigation.
⚠️ Requires CI workaround setting DOCS_BASE or VITEPRESS_BASE manually.
Steps of Reproduction ✅
1. From the docs project, run the build script defined in `docs/package.json:5-9` (`npm
run docs:build`), which executes `vitepress build .` and loads
`docs/.vitepress/config.ts:1-19`.

2. Configure the build environment for a GitHub Pages project site by setting
`GITHUB_PAGES=true` and `GITHUB_REPOSITORY=Tokn/Tokn`, while leaving `DOCS_BASE` and
`VITEPRESS_BASE` unset and not defining any `PHENOTYPE_CUSTOM_DOMAIN` variable (no such
variable is referenced anywhere else in the repo per `grep` under `/workspace/Tokn`).

3. During the build, `resolveDocsBase()` in `docs/.vitepress/config.ts:4-10` runs:
`explicit` is `undefined` because `DOCS_BASE` and `VITEPRESS_BASE` are unset, the check
`process.env.PHENOTYPE_CUSTOM_DOMAIN === 'true'` on line 7 evaluates to false because
nothing in the repo or workflows sets this variable, so the function falls through to line
9 and returns `"/Tokn/"` due to `GITHUB_PAGES === 'true'`.

4. The exported VitePress config at `docs/.vitepress/config.ts:15-19` uses `base:
docsBase`, so the generated site hardcodes links like `/Tokn/wiki/` and `/Tokn/api/`; when
the site is actually published at the root of a custom domain (e.g.,
`https://docs.example.com/`), these links point to the wrong paths and produce broken
navigation and asset URLs.

Fix in Cursor Fix in VSCode Claude

(Use Cmd/Ctrl + Click for best experience)

Prompt for AI Agent 🤖
This is a comment left during a code review.

**Path:** docs/.vitepress/config.ts
**Line:** 7:7
**Comment:**
	*Inconsistent Naming: The custom-domain detection is tied to `PHENOTYPE_CUSTOM_DOMAIN`, which appears to be a copy-paste variable name unrelated to this repo and is not set anywhere else. This makes the custom-domain branch effectively unreachable, so GitHub Pages builds with a custom domain can incorrectly use a `/{repo}/` base and produce broken asset/doc links. Use the correct project-specific env var (or a generic one consistently used by your workflows) for this check.

Validate the correctness of the flagged issue. If correct, How can I resolve this? If you propose a fix, implement it and please make it concise.
Once fix is implemented, also check other comments on the same PR, and ask user if the user wants to fix the rest of the comments as well. if said yes, then fetch all the comments validate the correctness and implement a minimal fix
👍 | 👎

@codeant-ai

codeant-ai Bot commented Jun 27, 2026

Copy link
Copy Markdown

CodeAnt AI finished reviewing your PR.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 087ecda3d2

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

with:
ref: ${{ github.ref }}
secrets:
github_token: ${{ secrets.GITHUB_TOKEN }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Use a non-GITHUB_TOKEN release credential

Because .github/workflows/release-attestation.yml listens for release: published, releases created by this workflow need to emit a follow-on release event. GitHub suppresses workflow runs triggered by events created with the default GITHUB_TOKEN, and the action's docs call out that a PAT is needed for release.published subscribers, so every automated v* release will upload binaries but skip the SLSA/provenance attestation workflow.

Useful? React with 👍 / 👎.

Comment on lines +77 to +80
- name: Upload release asset
uses: softprops/action-gh-release@v2
with:
files: dist/${{ matrix.artifact_name }}

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Pass the dispatch ref as the release tag

When binaries.yml is run manually with the advertised ref input, checkout builds that ref, but action-gh-release still defaults its target tag to github.ref_name because this step never passes tag_name. Running the workflow from main with ref: v1.2.3 therefore uploads to the wrong release/tag (or fails on a branch ref), so the manual rebuild path cannot publish the binary for the ref it just built.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M This PR changes 30-99 lines, ignoring generated files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant