File tree Expand file tree Collapse file tree 2 files changed +15
-3
lines changed
Expand file tree Collapse file tree 2 files changed +15
-3
lines changed Original file line number Diff line number Diff line change 1414 CARGO_TERM_COLOR : always
1515
1616jobs :
17+ test :
18+ uses : ./.github/workflows/test.yml
19+
1720 build :
21+ needs : test
1822 strategy :
1923 fail-fast : false
2024 matrix :
@@ -202,15 +206,15 @@ jobs:
202206 run : |
203207 for platform in darwin-arm64 darwin-x64 linux-arm64 linux-x64 linux-arm64-musl linux-x64-musl win32-arm64 win32-x64; do
204208 echo "Publishing @jj-ryu/$platform..."
205- npm publish npm/$platform --access public --provenance
209+ npm publish ./ npm/$platform --access public --provenance
206210 done
207211
208212 - name : Publish main package
209213 env :
210214 NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
211215 run : |
212216 echo "Publishing jj-ryu..."
213- npm publish npm/jj-ryu --access public --provenance
217+ npm publish ./ npm/jj-ryu --access public --provenance
214218
215219 # Publish to crates.io
216220 publish-crates :
@@ -224,4 +228,11 @@ jobs:
224228 uses : dtolnay/rust-toolchain@stable
225229
226230 - name : Publish to crates.io
227- run : cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }}
231+ run : |
232+ cargo publish --token ${{ secrets.CARGO_REGISTRY_TOKEN }} || {
233+ if cargo search jj-ryu --limit 1 | grep -q "^jj-ryu = \"${GITHUB_REF#refs/tags/v}\""; then
234+ echo "Version already published, skipping"
235+ else
236+ exit 1
237+ fi
238+ }
Original file line number Diff line number Diff line change 44 push :
55 branches : [main]
66 pull_request :
7+ workflow_call :
78
89env :
910 CARGO_INCREMENTAL : 0
You can’t perform that action at this time.
0 commit comments