From a979a22da70fadd229f68f415bfcf7b6f73f74b1 Mon Sep 17 00:00:00 2001 From: Kevin Obee Date: Mon, 12 Feb 2024 17:42:31 +0000 Subject: [PATCH 1/2] Create npm-publish.yml --- .github/workflows/npm-publish.yml | 38 +++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/npm-publish.yml diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml new file mode 100644 index 0000000..242ac4d --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,38 @@ +# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created +# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages + +name: Node.js Package + +on: + release: + types: [created] + workflow_dispatch: + +jobs: + build: + runs-on: ubuntu-latest + container: + image: mcr.microsoft.com/playwright:v1.41.1-jammy + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version-file: '.nvmrc' + cache: 'npm' + - run: npm ci + - run: npm test + + publish-npm: + needs: build + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-node@v3 + with: + node-version-file: '.nvmrc' + cache: 'npm' + registry-url: https://registry.npmjs.org/ + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{secrets.npm_token}} From 0d9dbfb3f4d78f23ea5157c7e593cc5386b3b799 Mon Sep 17 00:00:00 2001 From: kevinobee Date: Mon, 12 Feb 2024 17:45:49 +0000 Subject: [PATCH 2/2] add changeset --- .changeset/ten-dancers-dream.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/ten-dancers-dream.md diff --git a/.changeset/ten-dancers-dream.md b/.changeset/ten-dancers-dream.md new file mode 100644 index 0000000..11f4d1c --- /dev/null +++ b/.changeset/ten-dancers-dream.md @@ -0,0 +1,5 @@ +--- +"@faranglao/sveltekit-security-headers": patch +--- + +publish NPM package on GitHub release