-
Notifications
You must be signed in to change notification settings - Fork 578
feat: autogens cli at release #19284
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
Draft
sklppy88
wants to merge
1
commit into
ek/feat/autogen-bb-references
Choose a base branch
from
ek/feat/add-autogen-cli-at-release
base: ek/feat/autogen-bb-references
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,12 +20,35 @@ jobs: | |
| release-pr: ${{ steps.release.outputs.pr }} | ||
| release-version: ${{ steps.release.outputs.tag_name }} | ||
| steps: | ||
| - name: Checkout to check config files | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 | ||
| with: | ||
| sparse-checkout: .github | ||
| token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} | ||
|
|
||
| - name: Determine release-please config | ||
| id: config | ||
| run: | | ||
| BRANCH_CONFIG=".github/release-please-${{ github.ref_name }}.json" | ||
| DEFAULT_CONFIG=".github/release-please.json" | ||
|
|
||
| if [[ -f "$BRANCH_CONFIG" ]]; then | ||
| echo "Using branch-specific config: $BRANCH_CONFIG" | ||
| echo "config-file=$BRANCH_CONFIG" >> $GITHUB_OUTPUT | ||
| elif [[ -f "$DEFAULT_CONFIG" ]]; then | ||
| echo "Branch config not found, using default: $DEFAULT_CONFIG" | ||
| echo "config-file=$DEFAULT_CONFIG" >> $GITHUB_OUTPUT | ||
| else | ||
| echo "::error::No release-please config found. Expected $BRANCH_CONFIG or $DEFAULT_CONFIG" | ||
| exit 1 | ||
| fi | ||
|
|
||
| - name: Run Release Please | ||
| id: release | ||
| uses: googleapis/release-please-action@7d28262f14160787a44a6be36146a18e6f575a3f | ||
| with: | ||
| token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} | ||
| config-file: .github/release-please-${{ github.ref_name }}.json | ||
| config-file: ${{ steps.config.outputs.config-file }} | ||
| target-branch: ${{ github.ref_name }} | ||
|
|
||
| auto-tag: | ||
|
|
@@ -79,10 +102,12 @@ jobs: | |
| exit 1 | ||
| fi | ||
|
|
||
| if [[ "$MANIFEST_VERSION" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)$ ]]; then | ||
| # Accept stable versions (X.Y.Z) and prerelease versions (X.Y.Z-suffix.N) | ||
| if [[ "$MANIFEST_VERSION" =~ ^([0-9]+)\.([0-9]+)\.([0-9]+)(-[a-zA-Z0-9.]+)?$ ]]; then | ||
| NEXT_VERSION="$MANIFEST_VERSION" | ||
| else | ||
| echo "Error: Invalid manifest version format" | ||
| echo "Error: Invalid manifest version format: $MANIFEST_VERSION" | ||
| echo "Expected: X.Y.Z or X.Y.Z-prerelease.N" | ||
| exit 1 | ||
| fi | ||
|
|
||
|
|
@@ -179,6 +204,37 @@ jobs: | |
| ./scripts/aztec_nr_docs_generation/generate_aztec_nr_docs.sh ${{ steps.version.outputs.semver }} | ||
| echo "Generated Aztec.nr API docs for: ${{ steps.version.outputs.semver }}" | ||
|
|
||
| - name: Build bb (uses cache if available) | ||
| working-directory: ./barretenberg/cpp | ||
| run: | | ||
| ./bootstrap.sh build_native | ||
| echo "BB_PATH=$(pwd)/build/bin" >> $GITHUB_ENV | ||
|
|
||
| - name: Build aztec CLI | ||
| working-directory: ./yarn-project | ||
| run: | | ||
| ./bootstrap.sh | ||
| echo "AZTEC_CLI_PATH=$(pwd)/aztec/dest/bin" >> $GITHUB_ENV | ||
|
|
||
| - name: Generate CLI documentation | ||
| working-directory: ./docs | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. should this include |
||
| run: | | ||
| # Add locally built binaries to PATH | ||
| export PATH="${BB_PATH}:${PATH}" | ||
|
|
||
| # Create wrapper for aztec CLI that runs the local build | ||
| mkdir -p /tmp/cli-bin | ||
| cat > /tmp/cli-bin/aztec << 'EOF' | ||
| #!/bin/bash | ||
| node "$AZTEC_CLI_PATH/index.js" "$@" | ||
| EOF | ||
| chmod +x /tmp/cli-bin/aztec | ||
| export PATH="/tmp/cli-bin:${PATH}" | ||
|
|
||
| # Generate CLI docs using locally built binaries | ||
| ./scripts/cli_reference_generation/generate_all_cli_docs.sh | ||
| echo "Generated CLI documentation for: ${{ steps.version.outputs.semver }}" | ||
|
|
||
| - name: Cut Aztec Developer Docs version | ||
| working-directory: ./docs | ||
| run: | | ||
|
|
@@ -207,6 +263,8 @@ jobs: | |
|
|
||
| - name: Commit new Aztec Docs version | ||
| run: | | ||
| # Reset non-versioned CLI docs (only versioned copies should be committed) | ||
| git checkout -- docs/docs-developers/docs/cli/*_cli_reference.md || true | ||
| git add . | ||
| git commit -m "chore(docs): cut new aztec docs version for tag ${{ steps.version.outputs.semver }}" | ||
| git push | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 file does not exist