From 7d470040cf4a58abc504db1e25da0d1364711288 Mon Sep 17 00:00:00 2001 From: John Rees Date: Tue, 10 Aug 2021 17:02:52 +0100 Subject: [PATCH] feat: npm publish main if package version changes --- .github/workflows/npm-publish.yml | 20 ++++++++++++++++++++ 1 file changed, 20 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..039ee9b --- /dev/null +++ b/.github/workflows/npm-publish.yml @@ -0,0 +1,20 @@ +name: Publish to NPM +on: + push: + branches: + - main + +jobs: + publish: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + node-version: 14 + - run: npm install -g pnpm + - run: pnpm install + - uses: JS-DevTools/npm-publish@v1 + with: + token: ${{ secrets.NPM_TOKEN }} + dry-run: true