Skip to content

Commit 8274f92

Browse files
Bump JS-DevTools/npm-publish from 1 to 4 (#277)
* Bump JS-DevTools/npm-publish from 1 to 4 Bumps [JS-DevTools/npm-publish](https://github.com/js-devtools/npm-publish) from 1 to 4. - [Release notes](https://github.com/js-devtools/npm-publish/releases) - [Changelog](https://github.com/JS-DevTools/npm-publish/blob/main/CHANGELOG.md) - [Commits](JS-DevTools/npm-publish@v1...v4) --- updated-dependencies: - dependency-name: JS-DevTools/npm-publish dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <[email protected]> * Publish using `package.json` version only * Remove unnecessary `JS-DevTools/npm-publish` GitHub Action --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Colin Rotherham <[email protected]>
1 parent dcc0180 commit 8274f92

File tree

2 files changed

+18
-11
lines changed

2 files changed

+18
-11
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,14 @@ jobs:
3535
- name: Typescript build
3636
run: yarn build
3737

38-
- name: Set Version to Release Tag Name
39-
run: |
40-
yarn version ${{ github.event.release.tag_name }}
41-
42-
- name: Publish to npm, publish pre-release as beta
43-
uses: JS-DevTools/npm-publish@v1
44-
with:
45-
token: ${{ secrets.NPM_TOKEN }}
46-
tag: ${{ github.event.release.prerelease && 'beta' || 'latest' }}
38+
- name: Publish npm package
39+
if: ${{ !github.event.release.prerelease }}
40+
run: yarn npm publish --tag latest
41+
env:
42+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
43+
44+
- name: Publish npm package (pre-release)
45+
if: ${{ github.event.release.prerelease }}
46+
run: yarn npm publish --tag beta
47+
env:
48+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@
4848
"types": "dist/esm/index.d.ts",
4949
"files": [
5050
"src",
51-
"dist"
51+
"dist",
52+
"!**/*.test.*"
5253
],
5354
"scripts": {
5455
"cleanup": "rm -rf dist/ > /dev/null",
@@ -128,5 +129,9 @@
128129
"react-dom": ">=18.2.0",
129130
"tslib": ">=2.8.0"
130131
},
131-
"packageManager": "[email protected]"
132+
"packageManager": "[email protected]",
133+
"publishConfig": {
134+
"access": "public",
135+
"registry": "https://registry.npmjs.org/"
136+
}
132137
}

0 commit comments

Comments
 (0)