@@ -88,32 +88,32 @@ jobs:
88
88
run : |
89
89
if [[ "${{ matrix.platform }}" == "ubuntu-latest" ]]; then
90
90
if [[ "${{ matrix.arch }}" == "x64" ]]; then
91
- mkdir -p ./bin /linux/ x64
92
- cp target/x86_64-unknown-linux-gnu/release/todoctor ./bin /linux/ x64/todoctor
93
- chmod +x ./bin /linux/ x64/todoctor
91
+ mkdir -p ./packages /linux- x64
92
+ cp target/x86_64-unknown-linux-gnu/release/todoctor ./packages /linux- x64/todoctor
93
+ chmod +x ./packages /linux- x64/todoctor
94
94
elif [[ "${{ matrix.arch }}" == "arm64" ]]; then
95
- mkdir -p ./bin /linux/ arm64
96
- cp target/aarch64-unknown-linux-gnu/release/todoctor ./bin /linux/ arm64/todoctor
97
- chmod +x ./bin /linux/ arm64/todoctor
95
+ mkdir -p ./packages /linux- arm64
96
+ cp target/aarch64-unknown-linux-gnu/release/todoctor ./packages /linux- arm64/todoctor
97
+ chmod +x ./packages /linux- arm64/todoctor
98
98
fi
99
99
elif [[ "${{ matrix.platform }}" == "macos-latest" ]]; then
100
100
if [[ "${{ matrix.arch }}" == "x64" ]]; then
101
- mkdir -p ./bin/macos/ x64
102
- cp target/x86_64-apple-darwin/release/todoctor ./bin/macos/ x64/todoctor
103
- chmod +x ./bin/macos/ x64/todoctor
101
+ mkdir -p ./packages/darwin- x64
102
+ cp target/x86_64-apple-darwin/release/todoctor ./packages/darwin- x64/todoctor
103
+ chmod +x ./packages/darwin- x64/todoctor
104
104
elif [[ "${{ matrix.arch }}" == "arm64" ]]; then
105
- mkdir -p ./bin/macos/ arm64
106
- cp target/aarch64-apple-darwin/release/todoctor ./bin/macos/ arm64/todoctor
107
- chmod +x ./bin/macos/ arm64/todoctor
105
+ mkdir -p ./packages/darwin- arm64
106
+ cp target/aarch64-apple-darwin/release/todoctor ./packages/darwin- arm64/todoctor
107
+ chmod +x ./packages/darwin- arm64/todoctor
108
108
fi
109
109
fi
110
110
shell : bash
111
111
112
112
- name : Move Binaries to Bin Folder (Windows)
113
113
if : runner.os == 'Windows'
114
114
run : |
115
- mkdir bin\windows\ x64
116
- copy target\x86_64-pc-windows-msvc\release\todoctor.exe bin\windows\ x64\todoctor.exe
115
+ mkdir packages\win32- x64
116
+ copy target\x86_64-pc-windows-msvc\release\todoctor.exe packages\win32- x64\todoctor.exe
117
117
shell : cmd
118
118
119
119
- name : Upload Binaries
@@ -174,17 +174,17 @@ jobs:
174
174
175
175
- name : Set Execute Permissions on Binaries
176
176
run : |
177
- chmod +x ./bin /linux/ x64/todoctor
178
- chmod +x ./bin /linux/ arm64/todoctor
179
- chmod +x ./bin/macos/ x64/todoctor
180
- chmod +x ./bin/macos/ arm64/todoctor
177
+ chmod +x ./packages /linux- x64/todoctor
178
+ chmod +x ./packages /linux- arm64/todoctor
179
+ chmod +x ./packages/darwin- x64/todoctor
180
+ chmod +x ./packages/darwin- arm64/todoctor
181
181
182
182
- name : Verify Binary Permissions
183
183
run : |
184
- ls -l ./bin /linux/ x64/todoctor
185
- ls -l ./bin /linux/ arm64/todoctor
186
- ls -l ./bin/macos/ x64/todoctor
187
- ls -l ./bin/macos/ arm64/todoctor
184
+ ls -l ./packages /linux- x64/todoctor
185
+ ls -l ./packages /linux- arm64/todoctor
186
+ ls -l ./packages/darwin- x64/todoctor
187
+ ls -l ./packages/darwin- arm64/todoctor
188
188
189
189
- name : Create GitHub Release
190
190
run : pnpm run ci:changelog
@@ -194,8 +194,25 @@ jobs:
194
194
- name : Configure NPM Auth
195
195
run : echo "//registry.npmjs.org/:_authToken=${{ secrets.NODE_AUTH_TOKEN }}" > ~/.npmrc
196
196
197
+ - name : Update Package Versions
198
+ shell : bash
199
+ run : node ./scripts/version.js
200
+
197
201
- name : Clear Package JSON
198
202
run : pnpm run ci:clear
199
203
200
- - name : Publish to NPM
204
+ - name : Publish Root Package to NPM
201
205
run : npm publish --access public --no-git-checks --provenance
206
+
207
+ - name : Publish Packages to NPM
208
+ run : |
209
+ for pkg in packages/*; do
210
+ if [ -d "$pkg" ]; then
211
+ echo "Publishing package $pkg"
212
+ cd "$pkg"
213
+ npm publish --access public --no-git-checks --provenance
214
+ cd -
215
+ fi
216
+ done
217
+ env :
218
+ NODE_AUTH_TOKEN : ${{ secrets.NODE_AUTH_TOKEN }}
0 commit comments