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
23 changes: 4 additions & 19 deletions .github/workflows/prod-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,10 @@ jobs:
submodules: true
persist-credentials: false

- name: Setup Node.js 16
- name: Setup Node.js 22
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '22'
cache: 'npm'

- name: Install dependencies
Expand Down Expand Up @@ -97,7 +97,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '20'
node-version: '22'
registry-url: 'https://registry.npmjs.org'

- name: Configure AWS Credentials for Publish
Expand All @@ -118,22 +118,7 @@ jobs:
run: npm install -g npm@latest
- run: npm ci --unsafe-perm
- run: npm run build --if-present

# Generate OTP from the 2FA secret key, waiting for next TOTP window to maximize validity
- name: Generate OTP and publish
run: |
npm install otplib@12 --no-save
OTP=$(node -e "
const { authenticator } = require('otplib');
const remaining = authenticator.timeRemaining();
setTimeout(() => {
console.log(authenticator.generate(process.env.OTP_SECRET_KEY));
}, remaining * 1000);
")
npx lerna publish from-package --yes --otp $OTP --dist-tag ${{ github.event.inputs.dist_tag }}
env:
NODE_AUTH_TOKEN: ${{ env.NPM_AWS_CRYPTO_TOOLS_CI_BOT_2FA_NPM_TOKEN }}
OTP_SECRET_KEY: ${{ env.NPM_AWS_CRYPTO_TOOLS_CI_BOT_2FA_OTP_SECRET_KEY }}
- run: npx lerna publish from-package --yes --dist-tag ${{ github.event.inputs.dist_tag }}

# Once publishing is complete, validate that the published packages are useable
validate:
Expand Down
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
*.d.ts
*.d.ts
/.nx/workspace-data
3 changes: 2 additions & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,6 @@
}
},
"hoist": true,
"nohoist": ["typedoc"]
"nohoist": ["typedoc"],
"$schema": "node_modules/lerna/schemas/lerna-schema.json"
}
Loading
Loading