Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(npm): publish rc version for prereleases #528

Merged
merged 2 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 13 additions & 3 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
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 @@ -300,14 +300,24 @@ jobs:
with:
node-version: 18
registry-url: "https://registry.npmjs.org"
- name: Check if the release is a pre-release
working-directory: npm/git-cliff
shell: bash
id: check_pre_release
run: |
echo "IS_PRE_RELEASE=$([[ $(jq -r '.version' package.json | grep -E '\-rc.[0-9]+') ]] && echo "true" || echo "false")" >> $GITHUB_OUTPUT
- 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 [ "${{ steps.check_pre_release.outputs.IS_PRE_RELEASE}}" = "true" ]; then
favna marked this conversation as resolved.
Show resolved Hide resolved
yarn npm publish --tag rc
orhun marked this conversation as resolved.
Show resolved Hide resolved
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,8 @@
],
"cpu": [
"${node_arch}"
]
],
"publishConfig": {
"access": "public"
}
}
Loading