v0.1.3-rc.3

This commit is contained in:
wisdgod
2025-01-14 09:13:13 +08:00
parent 732cfbc58e
commit 061156fb79
36 changed files with 3585 additions and 787 deletions

View File

@@ -25,7 +25,7 @@ jobs:
sudo apt-get install -y protobuf-compiler pkg-config libssl-dev nodejs npm
- name: Build binary
run: cargo build --release --target ${{ matrix.target }}
run: RUSTFLAGS="-C link-arg=-s" cargo build --release --target ${{ matrix.target }}
- name: Upload artifact
uses: actions/upload-artifact@v4.5.0

View File

@@ -8,6 +8,11 @@ on:
required: true
type: boolean
default: false
upload_artifacts:
description: '是否上传构建产物'
required: true
type: boolean
default: true
push:
tags:
- 'v*'
@@ -54,7 +59,9 @@ jobs:
network=host
- name: Build and push Docker image
uses: docker/build-push-action@v6.10.0
uses: docker/build-push-action@v6.11.0
env:
DOCKER_BUILD_RECORD_UPLOAD: false
with:
context: .
push: true
@@ -62,4 +69,20 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
cache-to: type=gha,mode=max
outputs: type=local,dest=./dist,enable=${{ github.event_name == 'workflow_dispatch' && inputs.upload_artifacts }}
- name: Prepare artifacts
if: github.event_name == 'workflow_dispatch' && inputs.upload_artifacts
run: |
mkdir -p artifacts/amd64 artifacts/arm64
cp dist/linux_amd64/app/cursor-api artifacts/amd64/
cp dist/linux_arm64/app/cursor-api artifacts/arm64/
- name: Upload artifacts
if: github.event_name == 'workflow_dispatch' && inputs.upload_artifacts
uses: actions/upload-artifact@v4.6.0
with:
name: cursor-api-binaries
path: artifacts/
retention-days: 7