From 5358d03564e9b0ebc47fbe34101bde9989e66b84 Mon Sep 17 00:00:00 2001 From: Ivan Marban Date: Sat, 6 Jan 2024 22:05:47 +0100 Subject: [PATCH] chore: added npm publish workflow --- .github/workflows/publish.yaml | 26 ++++++++++++++++++++++++++ .npmignore | 14 ++++++++++++++ 2 files changed, 40 insertions(+) create mode 100644 .github/workflows/publish.yaml create mode 100644 .npmignore diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..499295d --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,26 @@ +name: Publish +on: + release: + types: + - published + +jobs: + npm-publish: + runs-on: ubuntu-latest + steps: + - name: Clone repository + uses: actions/checkout@v4 + + - name: Setup Node.js + uses: actions/setup-node@v4 + with: + node-version: 21 + registry-url: "https://registry.npmjs.org" + + - name: Install Dependencies + run: npm ci + + - name: Publish to npm registry + run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.npmignore b/.npmignore new file mode 100644 index 0000000..c5173a9 --- /dev/null +++ b/.npmignore @@ -0,0 +1,14 @@ +.github +.nyc_output +coverage +examples +node_modules +test +.dockerignore +.editorconfig +.eslintrc +.gitignore +.nycrc.yaml +.pre-commit-config.yaml +.prettierrc +Dockerfile