Skip to content

Commit

Permalink
Test before publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
gausie committed Oct 23, 2023
1 parent e0dd864 commit 02bc530
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,21 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
with:
node-version: "16.x"
node-version: "18.x"
registry-url: "https://registry.npmjs.org"

- name: Install
run: yarn

- name: Test
run: yarn test

- name: Check publish status
id: check
uses: tehpsalmist/npm-publish-status-action@v1

- name: Publish if necessary
if: ${{ steps.check.outputs.exists == '0' }}
run: |
yarn
yarn npm publish
run: yarn npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 02bc530

Please sign in to comment.