From a4c7921cc9206845f2a77f614f0b7f4091b2da5c Mon Sep 17 00:00:00 2001 From: Francesco Grauso Date: Tue, 14 May 2024 16:18:55 +0200 Subject: [PATCH] ci: Add publish pipeline (#11) --- .github/workflows/publish.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 .github/workflows/publish.yml diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..1d47566 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,22 @@ +name: Publish to NPM +on: + release: + types: [created] +jobs: + build: + runs-on: ubuntu-latest + environment: prod + steps: + - name: Checkout + uses: actions/checkout@a12a3943b4bdde767164f792f33f40b04645d846 + - name: Setup Node + uses: actions/setup-node@9ced9a43a244f3ac94f13bfd896db8c8f30da67a + with: + node-version: '18.x' + registry-url: 'https://registry.npmjs.org' + - name: Install dependencies and build with builder bob + run: yarn install --frozen-lockfile + - name: Publish package on NPM 📦 + run: npm publish --access=public + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_RELEASE_TOKEN }}