From b852c519204e8fb5eb43972216ea615a28a55fbb Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Thu, 29 Aug 2024 19:17:27 +0000 Subject: [PATCH 1/2] add test artefacts to .gitignore --- .gitignore | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.gitignore b/.gitignore index 30f39e8..d968c99 100644 --- a/.gitignore +++ b/.gitignore @@ -8,3 +8,5 @@ /.parcel-cache /esm /test/node_modules +/test/package-lock.json +/test/test-builds From 599123b50f59bb35b22e28b632f143bf4ed8580f Mon Sep 17 00:00:00 2001 From: legobt <6wbvkn0j@anonaddy.me> Date: Thu, 29 Aug 2024 19:19:40 +0000 Subject: [PATCH 2/2] github ci: add publish-npm workflow --- .github/workflows/publish-npm.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/publish-npm.yml diff --git a/.github/workflows/publish-npm.yml b/.github/workflows/publish-npm.yml new file mode 100644 index 0000000..0accffd --- /dev/null +++ b/.github/workflows/publish-npm.yml @@ -0,0 +1,22 @@ +name: Publish package to npm +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + permissions: + contents: read + id-token: write + steps: + - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4 + - uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4 + with: + node-version: ${{ matrix.node }} + registry-url: 'https://registry.npmjs.org' + cache: 'npm' + - run: npm ci + - run: npm run build + - run: npm publish --provenance --access public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}