diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 62b8d22..de76498 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,3 +27,19 @@ jobs: - run: npm ci - run: npm test - run: npm run build + + publish: + needs: test + if: success() && startsWith(github.ref, 'refs/tags') + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v2 + with: + registry-url: 'https://registry.npmjs.org' + + - run: npm ci + - run: npm publish + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} + \ No newline at end of file diff --git a/README.md b/README.md index 5cdcb07..faa66d6 100644 --- a/README.md +++ b/README.md @@ -86,8 +86,6 @@ npm run build # publishing to npm & GitHub releases # uses https://github.com/webpro/release-it npm run release -npm run release minor -npm run release major ``` ## Changelog diff --git a/package.json b/package.json index 943ed22..f5e19e6 100644 --- a/package.json +++ b/package.json @@ -61,7 +61,7 @@ "release": true }, "npm": { - "publish": true + "publish": false } } }