Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions .github/workflows/publish-aztec-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -287,6 +287,18 @@ jobs:
--VERSION=$VERSION \
--DRY_RUN=${{ (github.event.inputs.publish == 'false') && '1' || '0' }}

- name: Publish l1-contracts NPM package
run: |
DEPLOY_TAG=${{ env.DEPLOY_TAG }}
VERSION=${DEPLOY_TAG#aztec-packages-v
earthly-ci \
--no-output \
--secret NPM_TOKEN=${{ env.NPM_TOKEN }} \
./l1-contracts+publish-npm \
--DIST_TAG=latest \
--VERSION=$VERSION \
--DRY_RUN=${{ (github.event.inputs.publish == 'false') && '1' || '0' }}

- name: Publish bb.js NPM package
run: |
DEPLOY_TAG=${{ env.DEPLOY_TAG }}
Expand Down
14 changes: 14 additions & 0 deletions l1-contracts/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,17 @@ build:
test:
FROM +build
RUN forge test --no-match-contract UniswapPortalTest

publish-npm:
FROM +build
ARG VERSION
ARG DIST_TAG
ARG DRY_RUN=0
RUN --secret NPM_TOKEN echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > /usr/src/barretenberg/ts/.npmrc
WORKDIR /usr/src/l1-contracts
RUN jq --arg v $VERSION '.version = $v' package.json > _tmp.json && mv _tmp.json package.json
RUN if [ "$DRY_RUN" = "1" ]; then \
npm publish --tag $DIST_TAG --access public --dry-run; \
else \
npm publish --tag $DIST_TAG --access public; \
fi