-
Notifications
You must be signed in to change notification settings - Fork 1
Restructure TypeScript SDK as publishable npm package #43
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
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
f4b6e95
support mixed data structures in migration events
JanKuczma e8bc44a
Move L1 archive migration to test utils (#45)
JanKuczma 311ae58
Merge branch 'main' into jk-ts-support-event-mixed-data-structures
JanKuczma 22cab34
add build sdk step
JanKuczma 82529bc
fix publish wf
JanKuczma 6eee5cc
nit picks
JanKuczma 786e0f7
add concurrency policy to publish wf
JanKuczma 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 |
|---|---|---|
| @@ -0,0 +1,73 @@ | ||
| name: Publish SDK to npm | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| version: | ||
| description: 'Version to publish (e.g., 0.2.0). Leave empty to use package.json version.' | ||
| required: false | ||
| type: string | ||
| dry_run: | ||
| description: 'Dry run (no actual publish)' | ||
| required: false | ||
| type: boolean | ||
| default: true | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| env: | ||
| NODE_VERSION: '24.12.0' | ||
| AZTEC_VERSION: 4.0.0-devnet.2-patch.0 | ||
|
|
||
| jobs: | ||
| publish: | ||
| name: Build & Publish | ||
| runs-on: ubuntu-latest | ||
| timeout-minutes: 15 | ||
| concurrency: | ||
| group: publish-sdk-npm | ||
| cancel-in-progress: false | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
|
|
||
| - uses: actions/setup-node@v4 | ||
| with: | ||
| node-version: ${{ env.NODE_VERSION }} | ||
| registry-url: 'https://registry.npmjs.org' | ||
|
|
||
| - uses: ./.github/actions/setup-aztec | ||
| with: | ||
| version: ${{ env.AZTEC_VERSION }} | ||
|
|
||
| - name: Install dependencies | ||
| run: corepack enable && yarn install --frozen-lockfile | ||
|
|
||
| - name: Compile Noir contracts & generate bindings | ||
| run: yarn noir | ||
|
|
||
| - name: Build SDK | ||
| run: yarn ts:build | ||
|
|
||
| - name: Set version | ||
| if: inputs.version != '' | ||
| working-directory: ts/aztec-state-migration | ||
| env: | ||
| VERSION: ${{ inputs.version }} | ||
| run: | | ||
| [[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+([-.][0-9A-Za-z.]+)?$ ]] || { echo "Invalid semver: $VERSION"; exit 1; } | ||
| npm version "$VERSION" --no-git-tag-version | ||
|
|
||
| - name: Publish (dry run) | ||
| if: inputs.dry_run | ||
| working-directory: ts/aztec-state-migration | ||
| run: npm publish --access public --dry-run | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
|
||
| - name: Publish | ||
| if: ${{ !inputs.dry_run }} | ||
| working-directory: ts/aztec-state-migration | ||
| run: npm publish --access public | ||
| env: | ||
| NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
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
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
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
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
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
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.
Uh oh!
There was an error while loading. Please reload this page.