This commit is contained in:
曾志威
2026-09-24 12:02:26 +08:00
parent 8e19316cdc
commit 015a4c1580
+21 -40
View File
@@ -39,44 +39,25 @@ steps:
test "$(git rev-parse HEAD)" = "$DRONE_COMMIT_SHA" || { echo 'Checked out commit does not match this build'; exit 1; }
git log -1 --format='Checked out commit: %H'
- name: frontend-build
image: node:22.19.0-alpine
commands:
- npm --prefix web ci --no-audit --no-fund
- npm --prefix web run build
# docker 打包
- name: docker
image: plugins/docker
settings:
context: ./
dockerfile: ./Dockerfile
build_args_from_env:
- http_proxy
- https_proxy
- no_proxy
- HTTP_PROXY
- HTTPS_PROXY
- NO_PROXY
username:
from_secret: docker_username
password:
from_secret: docker_password
registry: https://registry.cn-hangzhou.aliyuncs.com
repo: registry.cn-hangzhou.aliyuncs.com/hub_z/webproxy
tags:
- latest
- name: build-binaries
image: golang:1.25.0-alpine
environment:
GOTOOLCHAIN: go1.25.0
CGO_ENABLED: "0"
commands:
- apk add --no-cache git
- sh scripts/build-ci-release.sh
- name: package
image: node:22.19.0-alpine
commands:
- apk add --no-cache libarchive-tools curl
- node --test scripts/ci-release.test.mjs
- node scripts/verify-package.mjs bin/build-cache/ci-release/linux-amd64/serviceport
- node scripts/ci-release.mjs package
- name: upload-ipfs
image: node:22.19.0-alpine
environment:
IPFS_API: https://ipfs.freeicu.top
IPFS_TOKEN: "674d69308edc52450a5fff0e64947703de3d47d723810b53833ec9d4e999f20e"
commands:
- apk add --no-cache curl
- node scripts/ci-release.mjs upload
when:
event:
- push
- tag
trigger:
event:
- push
- pull_request
- tag