publish #55
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: publish | |
on: | |
workflow_dispatch: | |
concurrency: | |
group: publish | |
cancel-in-progress: false | |
jobs: | |
npm: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_TOKEN }} | |
- uses: ./.github/actions/node-setup | |
- uses: ./.github/actions/yarn-setup | |
- name: bump version | |
run: | | |
# git user config | |
git config --local user.name "Seokju Na" | |
git config --local user.email "[email protected]" | |
# bump version | |
yarn version apply --all | |
git add -A | |
git checkout -- . | |
git diff-index --quiet HEAD -- || SHOULD_COMMIT="yes" | |
# update | |
echo $SHOULD_COMMIT | |
if [ -n "$SHOULD_COMMIT" ]; | |
then | |
git commit -m "bump version [skip ci]" | |
git push origin HEAD | |
else | |
echo "no updates"; | |
fi | |
- name: publish | |
run: | | |
echo "npmAuthToken: ${{ secrets.NPM_TOKEN }}" | tee $HOME/.yarnrc.yml | |
yarn workspaces foreach -At --no-private --include='packages/*' npm publish --access public --tolerate-republish |