Skip to content

Commit f29d42d

Browse files
committed
[CI/CD] foreach
1 parent da9cd41 commit f29d42d

7 files changed

Lines changed: 19 additions & 27 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -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

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,3 @@ build/
2828

2929
.turbo
3030
.npmrc
31-
.npmrc

.yarnrc.yml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1 @@
11
nodeLinker: pnp
2-
npmRegistryServer: "https://registry.npmjs.org/"
3-
npmAlwaysAuth: true
4-
npmAuthToken: ${NODE_AUTH_TOKEN}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"workspaces": [
44
"packages/*"
55
],
6-
"version": "0.1.26",
6+
"version": "0.1.29",
77
"packageManager": "yarn@4.5.3",
88
"scripts": {
99
"build": "yarn workspaces foreach --all npm run build",

packages/docs/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@spreadsheet-orm/docs",
3-
"version": "0.1.26",
3+
"version": "0.1.29",
44
"private": true,
55
"dependencies": {
66
"spreadsheet-orm": "workspace:*"

packages/main/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "spreadsheet-orm",
3-
"version": "0.1.26",
3+
"version": "0.1.29",
44
"description": "ORM for Google Spreadsheet - Query Builder and Schema Management for spreadsheet database",
55
"keywords": [
66
"google-spreadsheet",

packages/test/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@spreadsheet-orm/test",
3-
"version": "0.1.26",
3+
"version": "0.1.29",
44
"private": true,
55
"description": "Test suite for spreadsheet-orm",
66
"scripts": {

0 commit comments

Comments
 (0)