Skip to content

Commit

Permalink
chore(npm): publish rc version for prereleases (#528)
Browse files Browse the repository at this point in the history
* ci: publish rc version with rc dist-tags

* refactor: use github.ref
  • Loading branch information
favna committed Mar 5, 2024
1 parent 8b3d09f commit 16bea51
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 5 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/cd.yml
Expand Up @@ -249,7 +249,7 @@ jobs:
cp "../target/${{ matrix.build.TARGET }}/release/${bin}" "${node_pkg}/bin"
cp ../README.md "${node_pkg}"
cd "${node_pkg}"
npm publish --access public
npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Build Python wheels (linux)
Expand Down Expand Up @@ -302,12 +302,16 @@ jobs:
registry-url: "https://registry.npmjs.org"
- name: Publish the package
shell: bash
working-directory: npm/git-cliff
run: |
cd npm/git-cliff
yarn install
yarn build
cp ../../README.md .
npm publish --access public
if [ ${{ contains(github.ref, '-') }} = "true" ]; then
yarn npm publish --tag rc
else
yarn npm publish
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
YARN_ENABLE_IMMUTABLE_INSTALLS: false
Expand Down
5 changes: 4 additions & 1 deletion npm/git-cliff/package.json
Expand Up @@ -106,5 +106,8 @@
],
"root": true
},
"packageManager": "yarn@4.1.0"
"packageManager": "yarn@4.1.0",
"publishConfig": {
"access": "public"
}
}
5 changes: 4 additions & 1 deletion npm/package.json.tmpl
Expand Up @@ -51,5 +51,8 @@
],
"cpu": [
"${node_arch}"
]
],
"publishConfig": {
"access": "public"
}
}

0 comments on commit 16bea51

Please sign in to comment.