diff --git a/.github/workflows/publish-aztec-packages.yml b/.github/workflows/publish-aztec-packages.yml index b6a74a2f854..d28c577f875 100644 --- a/.github/workflows/publish-aztec-packages.yml +++ b/.github/workflows/publish-aztec-packages.yml @@ -275,7 +275,7 @@ jobs: with: concurrency_key: publish-npm dockerhub_password: "${{ env.DOCKERHUB_PASSWORD }}" - + - name: Publish bb.js NPM package run: | DEPLOY_TAG=${{ env.DEPLOY_TAG }} @@ -335,10 +335,10 @@ jobs: working-directory: ./aztec-up/terraform run: | terraform init - if [ "${{ github.ref_name }}" == "master" ]; then - TAG=master - else + if [ -n "${{ env.DEPLOY_TAG }}" ]; then TAG=${{ env.DEPLOY_TAG }} + else + TAG=${{ github.ref_name }} fi export TF_VAR_VERSION=${TAG#aztec-packages-v} terraform apply -auto-approve diff --git a/l1-contracts/Earthfile b/l1-contracts/Earthfile index f8932184cfe..821f4e7befc 100644 --- a/l1-contracts/Earthfile +++ b/l1-contracts/Earthfile @@ -32,8 +32,8 @@ publish-npm: 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 --secret NPM_TOKEN echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc 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; \