We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cb12afe commit d08646dCopy full SHA for d08646d
.github/workflows/npm-publish.yml
@@ -28,7 +28,19 @@ jobs:
28
with:
29
node-version: 20
30
registry-url: https://registry.npmjs.org/
31
+ - name: Check package version
32
+ id: cpv
33
+ uses: PostHog/check-package-version@v2
34
+ with:
35
+ path: '.'
36
+ - name: Show version info
37
+ run: |
38
+ echo "Committed version: ${{ steps.cpv.outputs.committed-version }}"
39
+ echo "Published version: ${{ steps.cpv.outputs.published-version }}"
40
+ echo "Is new version: ${{ steps.cpv.outputs.is-new-version }}"
41
- run: npm ci
- - run: npm publish --access public
42
+ - name: Publish new version
43
+ if: steps.cpv.outputs.is-new-version == 'true'
44
+ run: npm publish --access public
45
env:
46
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
0 commit comments