diff --git a/.github/workflows/publish-package.yml b/.github/workflows/publish-package.yml index 5f6eaff..3633cb0 100644 --- a/.github/workflows/publish-package.yml +++ b/.github/workflows/publish-package.yml @@ -1,11 +1,8 @@ name: Publish Package on: - push: - branches: - - 'master' - tags: - - '*.*.*' + release: + types: [published] jobs: publish: @@ -18,6 +15,6 @@ jobs: # Setup .npmrc file to publish to npm registry-url: 'https://registry.npmjs.org' - run: npm i - - run: npm publish --access public + - run: npm publish env: NODE_AUTH_TOKEN: ${{ secrets.NPM_VIMEO_PUBLISH_TOKEN }} diff --git a/package.json b/package.json index 75648cb..6f4ab4b 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,10 @@ "lib": "lib", "test": "test" }, + "publishConfig": { + "registry": "https://registry.npmjs.org/", + "access": "public" + }, "repository": { "type": "git", "url": "git+https://github.com/vimeo/vimeo.js.git"