mirror of
https://github.com/zeke-chin/cursor-api.git
synced 2025-12-24 11:50:59 +08:00
update: github workflow
This commit is contained in:
52
.github/workflows/build-rs-capi.yml
vendored
52
.github/workflows/build-rs-capi.yml
vendored
@@ -16,45 +16,21 @@ env:
|
||||
|
||||
jobs:
|
||||
build-and-push:
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- runner: ubuntu-latest
|
||||
platforms: linux/amd64,linux/arm64
|
||||
- runner: macos-latest
|
||||
platforms: darwin/amd64
|
||||
- runner: macos-14
|
||||
platforms: darwin/arm64
|
||||
|
||||
runs-on: ${{ matrix.runner }}
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write # 需要写入权限来创建 release
|
||||
contents: write
|
||||
packages: write
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0 # 获取完整的 git 历史用于生成 changelog
|
||||
|
||||
- name: Set up Docker on macOS
|
||||
if: runner.os == 'macOS'
|
||||
run: |
|
||||
brew install docker docker-buildx colima
|
||||
colima start
|
||||
# 配置 docker buildx 插件目录
|
||||
mkdir -p ~/.docker/cli-plugins
|
||||
ln -sfn $(brew --prefix)/opt/docker-buildx/bin/docker-buildx ~/.docker/cli-plugins/docker-buildx
|
||||
# 等待 Docker daemon 启动
|
||||
sleep 10
|
||||
docker context use colima
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up QEMU
|
||||
if: runner.os == 'Linux'
|
||||
uses: docker/setup-qemu-action@v3
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
if: runner.os == 'Linux'
|
||||
uses: docker/setup-buildx-action@v3
|
||||
|
||||
- name: Log in to the Container registry
|
||||
@@ -82,7 +58,7 @@ jobs:
|
||||
context: ./rs-capi
|
||||
file: ./rs-capi/Dockerfile
|
||||
push: ${{ github.event_name != 'pull_request' }}
|
||||
platforms: ${{ matrix.platforms }}
|
||||
platforms: linux/amd64,linux/arm64
|
||||
tags: ${{ steps.meta.outputs.tags }}
|
||||
labels: ${{ steps.meta.outputs.labels }}
|
||||
|
||||
@@ -102,24 +78,6 @@ jobs:
|
||||
- name: Generate Changelog
|
||||
id: changelog
|
||||
uses: mikepenz/release-changelog-builder-action@v4
|
||||
with:
|
||||
configuration: |
|
||||
{
|
||||
"categories": [
|
||||
{
|
||||
"title": "## 🚀 Features",
|
||||
"labels": ["feature"]
|
||||
},
|
||||
{
|
||||
"title": "## 🐛 Fixes",
|
||||
"labels": ["fix"]
|
||||
},
|
||||
{
|
||||
"title": "## 📦 Dependencies",
|
||||
"labels": ["dependencies"]
|
||||
}
|
||||
]
|
||||
}
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
@@ -136,8 +94,6 @@ jobs:
|
||||
Available platforms:
|
||||
- linux/amd64
|
||||
- linux/arm64
|
||||
- darwin/amd64
|
||||
- darwin/arm64
|
||||
|
||||
## Changelog
|
||||
${{ steps.changelog.outputs.changelog }}
|
||||
|
||||
Reference in New Issue
Block a user