diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e856eeb..6c3f9b7 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -2,8 +2,7 @@ name: Publish on: push: - tags: - - "*" + pull_request: jobs: build: @@ -17,6 +16,8 @@ jobs: registry-url: "https://registry.npmjs.org" - run: yarn install - run: yarn build + - run: npm publish --dry-run - run: npm publish + if: startsWith(github.ref, 'refs/tags/') env: NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 15c8221..b6dfa0c 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -19,4 +19,4 @@ jobs: - run: yarn install - run: yarn lint - run: yarn build - - run: npm publish --dry-run + - run: yarn test