mirror of
https://github.com/zeke-chin/cursor-api.git
synced 2025-10-05 23:46:51 +08:00
update: github workflow
This commit is contained in:
23
.github/workflows/build-rs-capi.yml
vendored
23
.github/workflows/build-rs-capi.yml
vendored
@@ -2,8 +2,10 @@ name: Build and Release
|
|||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
branches: [ "main" ]
|
||||||
- 'v*'
|
tags: [ "v*" ]
|
||||||
|
paths:
|
||||||
|
- 'rs-capi/**'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
# 构建各平台二进制文件
|
# 构建各平台二进制文件
|
||||||
@@ -13,16 +15,16 @@ jobs:
|
|||||||
include:
|
include:
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: x86_64-unknown-linux-gnu
|
target: x86_64-unknown-linux-gnu
|
||||||
artifact_name: rs-cap-linux-x86_64.tar.gz
|
artifact_name: rs-capi-linux-x86_64.tar.gz
|
||||||
- os: ubuntu-latest
|
- os: ubuntu-latest
|
||||||
target: aarch64-unknown-linux-gnu
|
target: aarch64-unknown-linux-gnu
|
||||||
artifact_name: rs-cap-linux-aarch64.tar.gz
|
artifact_name: rs-capi-linux-aarch64.tar.gz
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
target: x86_64-apple-darwin
|
target: x86_64-apple-darwin
|
||||||
artifact_name: rs-cap-darwin-x86_64.tar.gz
|
artifact_name: rs-capi-darwin-x86_64.tar.gz
|
||||||
- os: macos-latest
|
- os: macos-latest
|
||||||
target: aarch64-apple-darwin
|
target: aarch64-apple-darwin
|
||||||
artifact_name: rs-cap-darwin-aarch64.tar.gz
|
artifact_name: rs-capi-darwin-aarch64.tar.gz
|
||||||
|
|
||||||
runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
@@ -37,12 +39,15 @@ jobs:
|
|||||||
override: true
|
override: true
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
|
working-directory: rs-capi
|
||||||
run: cargo build --release --target ${{ matrix.target }}
|
run: cargo build --release --target ${{ matrix.target }}
|
||||||
|
|
||||||
- name: Package
|
- name: Package
|
||||||
run: tar -czf ${{ matrix.artifact_name }} -C target/${{ matrix.target }}/release rs-cap
|
working-directory: rs-capi
|
||||||
|
run: tar -czf ${{ matrix.artifact_name }} -C target/${{ matrix.target }}/release rs-capi
|
||||||
|
|
||||||
- name: Upload artifact
|
- name: Upload artifact
|
||||||
|
working-directory: rs-capi
|
||||||
uses: actions/upload-artifact@v3
|
uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ matrix.artifact_name }}
|
name: ${{ matrix.artifact_name }}
|
||||||
@@ -59,7 +64,7 @@ jobs:
|
|||||||
uses: softprops/action-gh-release@v1
|
uses: softprops/action-gh-release@v1
|
||||||
with:
|
with:
|
||||||
files: |
|
files: |
|
||||||
*/rs-cap-*.tar.gz
|
*/rs-capi-*.tar.gz
|
||||||
draft: false
|
draft: false
|
||||||
prerelease: false
|
prerelease: false
|
||||||
env:
|
env:
|
||||||
@@ -92,7 +97,7 @@ jobs:
|
|||||||
uses: docker/build-push-action@v4
|
uses: docker/build-push-action@v4
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
file: rs-cap/Dockerfile
|
file: rs-capi/Dockerfile
|
||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
push: true
|
push: true
|
||||||
tags: |
|
tags: |
|
||||||
|
Reference in New Issue
Block a user