From a1442fec01fcbbf9a2e2d36e00a84eec5226cabf Mon Sep 17 00:00:00 2001 From: Marc Pichler Date: Mon, 14 Oct 2024 17:50:56 +0200 Subject: [PATCH] ci: add workflow to publish packages to npm (#5067) --- .github/workflows/publish-to-npm.yml | 31 ++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/publish-to-npm.yml diff --git a/.github/workflows/publish-to-npm.yml b/.github/workflows/publish-to-npm.yml new file mode 100644 index 00000000000..b51678268ab --- /dev/null +++ b/.github/workflows/publish-to-npm.yml @@ -0,0 +1,31 @@ +name: Publish packages to NPM + +on: + workflow_dispatch: + +jobs: + release-to-npm: + runs-on: ubuntu-latest + permissions: + id-token: write + steps: + - name: Checkout Repository + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Setup Node + uses: actions/setup-node@v4 + with: + node-version: 18 + registry-url: 'https://registry.npmjs.org' + + - run: npm ci + + - run: npm run compile + + - name: Publish to npm + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} + NPM_CONFIG_PROVENANCE: true + run: npx lerna publish --concurrency 1 from-package --no-push --no-private --no-git-tag-version --no-verify-access --yes