mirror of
https://github.com/wisdgod/cursor-api.git
synced 2025-12-24 13:38:01 +08:00
v0.1.3-rc.3
This commit is contained in:
2
.github/workflows/build-linux.yml
vendored
2
.github/workflows/build-linux.yml
vendored
@@ -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
|
||||
|
||||
27
.github/workflows/docker.yml
vendored
27
.github/workflows/docker.yml
vendored
@@ -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
|
||||
Reference in New Issue
Block a user