From 07b402fed118d7ae7fc901e6a6c96a4f7b1b842d Mon Sep 17 00:00:00 2001 From: Nicolas Lebrun Date: Sun, 10 Dec 2023 10:20:51 +0100 Subject: [PATCH] Create npm.yml --- .github/workflows/npm.yml | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/workflows/npm.yml diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml new file mode 100644 index 0000000..df29dbc --- /dev/null +++ b/.github/workflows/npm.yml @@ -0,0 +1,21 @@ +name: Publish Package to npmjs +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + - run: npm install -g npm + - run: npm ci + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}