diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index b817b24..e29de02 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,8 +4,9 @@ name: Node.js Package on: - release: - types: [published] + push: + branches: + - main jobs: build: @@ -20,13 +21,17 @@ jobs: - run: npx playwright install - run: npm run test - publish-gpr: + publish: needs: build runs-on: ubuntu-latest permissions: contents: read packages: write steps: + - name: Check version changes + uses: EndBug/version-check@v2 + id: check + - uses: actions/checkout@v3 - uses: actions/setup-node@v3 with: @@ -34,6 +39,9 @@ jobs: registry-url: https://registry.npmjs.org/ - run: npm ci - run: npm run build - - run: npm publish + + - name: Version update detected + if: steps.check.outputs.changed == 'true' + run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index a71654e..47abff9 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ /test/ custom-elements.json .npmrc +.DS_Store # top level source capture-eye.js capture-eye.js.map diff --git a/package-lock.json b/package-lock.json index 55d344c..873358c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@numbersprotocol/capture-eye", - "version": "0.0.2", + "version": "0.0.3", "lockfileVersion": 2, "requires": true, "packages": { "": { "name": "@numbersprotocol/capture-eye", - "version": "0.0.2", + "version": "0.0.3", "license": "GPL-3.0", "dependencies": { "lit": "^3.0.0" diff --git a/package.json b/package.json index f028ebc..e3b875c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@numbersprotocol/capture-eye", - "version": "0.0.2", + "version": "0.0.3", "description": "Capture Eye widget seamlessly integrates into your website, facilitating secure and transparent provenance display and purchases of digital content directly from the creator", "main": "capture-eye.js", "module": "capture-eye.js",