From 4035e9fa7d5d02f878760974154a464ad04fc0bb Mon Sep 17 00:00:00 2001 From: BowTiedRadone Date: Wed, 15 Jan 2025 17:44:36 +0200 Subject: [PATCH] Add workflow to automate publishing the releases to `npm` This commit cherry picks the previously reverted npm publish workflow. --- .github/workflows/npm-publish-release.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 .github/workflows/npm-publish-release.yml diff --git a/.github/workflows/npm-publish-release.yml b/.github/workflows/npm-publish-release.yml new file mode 100644 index 0000000..48c2a6b --- /dev/null +++ b/.github/workflows/npm-publish-release.yml @@ -0,0 +1,18 @@ +name: npm-publish +on: + release: + types: [published] +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: "22" + registry-url: "https://registry.npmjs.org" + - run: npm ci + - run: npm test + - run: npm publish --access public + env: + NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}