-
Notifications
You must be signed in to change notification settings - Fork 47
43 lines (41 loc) · 1.18 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: publish
on:
push:
branches:
- main
jobs:
npm:
runs-on: ubuntu-latest
environment: production
concurrency:
group: publish-npm
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 --no-private npm publish --access public --tolerate-republish