This commit is contained in:
parent
4c1bcf8fd5
commit
c3be4631e5
38
.drone.yml
38
.drone.yml
@ -1,38 +0,0 @@
|
||||
kind: pipeline
|
||||
type: docker
|
||||
name: default
|
||||
|
||||
when:
|
||||
event:
|
||||
- push
|
||||
- pull_request
|
||||
- tag
|
||||
|
||||
steps:
|
||||
|
||||
- name: test
|
||||
image: rust:1.81-bookworm
|
||||
commands:
|
||||
- cargo test --verbose --all
|
||||
|
||||
- name: build (wasm_pack)
|
||||
image: rust:1.81-bookworm
|
||||
commands:
|
||||
- curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
- (cd um_wasm && wasm-pack build --release --target web --out-dir ../um_wasm_loader/pkg)
|
||||
|
||||
- name: build (node)
|
||||
image: node:22.9-bookworm
|
||||
environment:
|
||||
NPM_TOKEN:
|
||||
from_secret: NPM_TOKEN
|
||||
COREPACK_ENABLE_AUTO_PIN: 0
|
||||
BUILD_SKIP_WASM_PACK: 1
|
||||
depends_on:
|
||||
- "build (wasm_pack)"
|
||||
commands:
|
||||
- corepack enable
|
||||
- cd um_wasm_loader
|
||||
- pnpm i
|
||||
- pnpm build
|
||||
- ./ci_publish.sh
|
35
.gitea/workflows/build.yaml
Normal file
35
.gitea/workflows/build.yaml
Normal file
@ -0,0 +1,35 @@
|
||||
name: Build and Deploy
|
||||
on: [ push ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
COREPACK_ENABLE_AUTO_PIN: 0
|
||||
BUILD_SKIP_WASM_PACK: 1
|
||||
steps:
|
||||
- name: Check out repository code
|
||||
uses: actions/checkout@v4
|
||||
- name: Test
|
||||
run: cargo test --verbose --all
|
||||
- name: Setup wasm-pack
|
||||
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
|
||||
- name: Build (rust to wasm)
|
||||
run: |
|
||||
cd um_wasm
|
||||
wasm-pack build --release --target web --out-dir ../um_wasm_loader/pkg
|
||||
- name: Setup pnpm
|
||||
uses: pnpm/action-setup@v4.0.0
|
||||
with:
|
||||
standalone: true
|
||||
run_install: |
|
||||
- cwd: um_wasm_loader
|
||||
args: [--frozen-lockfile, --strict-peer-dependencies]
|
||||
- name: Build (wasm)
|
||||
working-directory: um_wasm_loader
|
||||
run: pnpm build
|
||||
- name: Publish
|
||||
working-directory: um_wasm_loader
|
||||
env:
|
||||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
||||
run: ./ci_publish.sh
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
|
||||
if [[ -z "${DRONE_TAG}" ]]; then
|
||||
if [[ ! "$GITHUB_REF" =~ ^refs/tags/ ]]; then
|
||||
echo "skip package publish, pack only."
|
||||
pnpm pack
|
||||
exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user