Skip to content

Commit

Permalink
ci: fixup release nodejs and rc site (#4569)
Browse files Browse the repository at this point in the history
Signed-off-by: tison <[email protected]>
  • Loading branch information
tisonkun authored May 2, 2024
1 parent 0d708ee commit b865254
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/ci_bindings_nodejs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ jobs:
-e NAPI_TARGET=x86_64-unknown-linux-gnu \
-w /build/bindings/nodejs \
ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian \
bash -c "pnpm build"
bash -c "corepack enable && pnpm build"
cd bindings/nodejs
# change owner to current user
sudo chown -R 1001:121 *.node
Expand All @@ -105,6 +105,7 @@ jobs:
ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian-aarch64 \
bash -c "set -e &&
rustup target add aarch64-unknown-linux-gnu &&
corepack enable &&
pnpm build --target aarch64-unknown-linux-gnu &&
aarch64-unknown-linux-gnu-strip *.node"
cd bindings/nodejs
Expand All @@ -119,6 +120,7 @@ jobs:
ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine \
bash -c "set -e &&
rustup target add aarch64-unknown-linux-musl &&
corepack enable &&
pnpm build --target aarch64-unknown-linux-musl &&
/aarch64-linux-musl-cross/bin/aarch64-linux-musl-strip *.node"
cd bindings/nodejs
Expand Down
9 changes: 8 additions & 1 deletion .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -488,13 +488,20 @@ jobs:
publish_dir: website/build
publish_branch: site/main-staging

- name: Prepare rc staged name
if: ${{ startsWith(github.ref, 'refs/tags/') && contains(github.ref, 'rc') }}
run: |
export OPENDAL_WEBSITE_STAGED_NAME=$(echo ${{ github.ref_name }} | sed 's/[.-]/_/g')
echo OPENDAL_WEBSITE_STAGED_NAME=${OPENDAL_WEBSITE_STAGED_NAME}
echo OPENDAL_WEBSITE_STAGED_NAME=${OPENDAL_WEBSITE_STAGED_NAME} >> $GITHUB_ENV
- name: Deploy to rc staged
uses: peaceiris/[email protected]
if: ${{ startsWith(github.ref, 'refs/tags/') && contains(github.ref, 'rc') }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: website/build
publish_branch: site/${{ github.ref_name }}-staging
publish_branch: site/${{ env.OPENDAL_WEBSITE_STAGED_NAME }}-staging

- name: Clear build
run: rm -rf ./website/build
Expand Down

0 comments on commit b865254

Please sign in to comment.