v0.1.3-rc.3.3

限制 `TOKEN_DELIMITER` 为 ASCII 避免问题
This commit is contained in:
wisdgod
2025-01-18 04:19:55 +08:00
parent 742c2e1c5c
commit 3e304f53d4
10 changed files with 43 additions and 112 deletions

View File

@@ -2,9 +2,9 @@ name: Build
on:
workflow_dispatch:
push:
tags:
- 'v*'
# push:
# tags:
# - 'v*'
jobs:
build:

View File

@@ -49,7 +49,7 @@ jobs:
tags: |
type=raw,value=latest,enable=${{ github.event_name == 'workflow_dispatch' && inputs.update_latest }}
type=raw,value=${{ steps.cargo_version.outputs.version }},enable=${{ github.event_name == 'workflow_dispatch' }}
type=ref,event=tag,enable=${{ github.event_name == 'push' }}
type=raw,value=${{ github.ref_name }},enable=${{ github.event_name == 'push' }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3.8.0
@@ -70,17 +70,24 @@ jobs:
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max
outputs: type=local,dest=./dist,enable=${{ github.event_name == 'workflow_dispatch' && inputs.upload_artifacts }}
outputs: type=local,dest=./dist,enable=${{ (github.event_name == 'workflow_dispatch' && inputs.upload_artifacts) || github.event_name == 'push'}}
- 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/
mkdir -p artifacts
cp dist/linux_amd64/app/cursor-api artifacts/cursor-api-x86_64-${{ steps.cargo_version.outputs.version }}
cp dist/linux_arm64/app/cursor-api artifacts/cursor-api-aarch64-${{ steps.cargo_version.outputs.version }}
- name: Prepare artifacts
if: github.event_name == 'push'
run: |
mkdir -p artifacts
cp dist/linux_amd64/app/cursor-api artifacts/cursor-api-x86_64-${{ github.event_name }}
cp dist/linux_arm64/app/cursor-api artifacts/cursor-api-aarch64-${{ github.event_name }}
- name: Upload artifacts
if: github.event_name == 'workflow_dispatch' && inputs.upload_artifacts
if: (github.event_name == 'workflow_dispatch' && inputs.upload_artifacts) || github.event_name == 'push'
uses: actions/upload-artifact@v4.6.0
with:
name: cursor-api-binaries