@@ -26,48 +26,44 @@ jobs:
2626 registry-url : ' https://registry.npmjs.org'
2727 env :
2828 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
29+
30+ - name : Configure Yarn authentication
31+ run : |
32+ echo 'npmRegistryServer: "https://registry.npmjs.org"' >> .yarnrc.yml
33+ echo 'npmAlwaysAuth: true' >> .yarnrc.yml
34+ echo 'npmAuthToken: "${{ secrets.NPM_TOKEN }}"' >> .yarnrc.yml
2935
3036 - name : Install dependencies (Yarn Berry)
3137 run : yarn install --immutable
3238 env :
3339 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
3440
35- - name : Debug .npmrc
36- run : cat .npmrc
37- continue-on-error : true # 빌드 스크립트가 없어도 계속 진행
38-
3941 - name : Debug .yarnrc.yml
4042 run : cat .yarnrc.yml
41- continue-on-error : true # 빌드 스크립트가 없어도 계속 진행
43+ continue-on-error : true
4244
4345 - name : Run tests (if test script exists)
4446 run : yarn workspaces foreach --all --topological --parallel --no-private run test
45- continue-on-error : true # 테스트 스크립트가 없어도 계속 진행
47+ continue-on-error : true
4648
4749 - name : Build project (if build script exists)
4850 run : yarn workspaces foreach --all --topological --parallel --no-private run build
49- continue-on-error : true # 빌드 스크립트가 없어도 계속 진행
51+ continue-on-error : true
5052
5153 - name : Bump version & create tag (only on main branch)
5254 if : github.ref == 'refs/heads/main'
5355 run : |
5456 yarn workspaces foreach --all version patch
5557 git push --follow-tags
5658
57- # - name: Publish to npm using yarn workspaces
59+ - name : Publish to npm using yarn workspaces
60+ if : github.ref == 'refs/heads/main'
61+ run : yarn workspaces foreach --verbose --all --topological --no-private npm publish --access public
62+
63+ # - name: Publish to npm (only on main branch)
5864 # if: github.ref == 'refs/heads/main'
59- # run: yarn workspaces foreach --verbose --all --topological --no-private npm publish --access public
60- # env:
61- # NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
65+ # run: cd ./packages/main && npm publish --verbose --access public
6266
63- - name : Publish to npm (only on main branch)
64- if : github.ref == 'refs/heads/main'
65- run : cd ./packages/main && npm publish --verbose --access public
6667
6768
68- # - name: Configure Yarn authentication
69- # run: |
70- # echo 'npmRegistryServer: "https://registry.npmjs.org"' >> .yarnrc.yml
71- # echo 'npmAlwaysAuth: true' >> .yarnrc.yml
72- # echo 'npmAuthToken: "${{ secrets.NPM_TOKEN }}"' >> .yarnrc.yml
7369
0 commit comments