Skip to content

Commit

Permalink
Edit publish script.
Browse files Browse the repository at this point in the history
  • Loading branch information
barinbritva committed Feb 14, 2024
1 parent d73bb5b commit 55f5882
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ jobs:
ALLOWED_PACKAGES=("phaser") # Add more package names if needed
if [[ " ${ALLOWED_PACKAGES[@]} " =~ " ${PACKAGE_NAME} " ]]; then
echo "::set-output name=package::${PACKAGE_NAME}"
echo "::set-output name=version::${GITHUB_REF#refs/tags/}"
else
echo "Invalid package name ${PACKAGE_NAME}."
exit 1
Expand Down Expand Up @@ -48,6 +49,12 @@ jobs:
run: npm run build --workspace @ton/${{ steps.get-package.outputs.package }}-sdk

- name: Publish
run: cd packages/${{ steps.get-package.outputs.package }} && npm publish --access=public
run: |
cd packages/${{ steps.get-package.outputs.package }}
if echo "${{ steps.get_version.outputs.version }}" | grep -q "\-beta"; then
npm publish --access=public --tag=beta
else
npm publish --access=public
fi
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 55f5882

Please sign in to comment.