Skip to content

5.4.0

5.4.0 #140

Workflow file for this run

name: Release
on:
workflow_dispatch:
release:
types:
- published
jobs:
release:
name: release
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x]
permissions:
contents: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Create .npmrc
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > .npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Install dependencies
run: |
npm install
#- name: Transpile for Node.js ${{ matrix.node-version }} (esm)
# run: |
# ./node_modules/.bin/lerna exec --bail --concurrency 2 -- ../../node_modules/.bin/swc --config-file ../../swc.esm.config.json --source-maps false index.js --out-file index.js
# ./node_modules/.bin/swc --config-file ./swc.esm.config.json --source-maps false packages/validator/transpile.js --out-file packages/validator/transpile.js
#- name: Transpile for Node.js ${{ matrix.node-version }} (cjs)
# run: |
# ./node_modules/.bin/lerna exec --bail --concurrency 2 -- ../../node_modules/.bin/swc --config-file ../../swc.cjs.config.json --source-maps false index.js --out-file index.cjs
# ./node_modules/.bin/lerna exec --bail --concurrency 2 -- sed -i.bak 's/exports,\ \"default\"/module,\ \"exports\"/g' index.cjs # Fix CommonJS default import
# sed -i.bak 's/awsEmbeddedMetrics.default.createMetricsLogger/awsEmbeddedMetrics.createMetricsLogger/g' packages/cloudwatch-metrics/index.cjs # Fix CommonJS default import
# ./node_modules/.bin/swc --config-file ./swc.cjs.config.json --source-maps false packages/validator/transpile.js --out-file packages/validator/transpile.cjs
# sed -i.bak 's/exports,\ \"default\"/module,\ \"exports\"/g' packages/validator/transpile.cjs # Fix CommonJS default import
#- name: Pre-Release
# if: contains(${{GITHUB_REF}}, 'alpha') || contains(${{GITHUB_REF}}, 'beta') || contains(${{GITHUB_REF}}, 'rc')
# run: |
# npm run lerna:publish:next
- name: Release
# if: contains(${{GITHUB_REF}}, 'alpha') == false && contains(${{GITHUB_REF}}, 'beta') == false && contains(${{GITHUB_REF}}, 'rc') == false
run: |
npm run lerna:publish
env:
NPM_CONFIG_PROVENANCE: 'true'