-
Notifications
You must be signed in to change notification settings - Fork 0
54 lines (45 loc) · 1.56 KB
/
opencode.yml
File metadata and controls
54 lines (45 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
name: opencode
on:
schedule:
- cron: '0 */6 * * *' # 每6小时检查一次
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
platform: [linux-64, linux-aarch64]
steps:
- name: Checkout repository
uses: actions/checkout@v6
with:
repository: SilenWang/Recipes
- name: Setup Pixi
uses: prefix-dev/setup-pixi@v0.9.4
with:
pixi-version: v0.63.2
auth-host: prefix.dev
auth-token: ${{ secrets.PREFIX_DEV_TOKEN }}
working-directory: opencode
- name: Get latest release from origin
id: origin_release
uses: pozetroninc/github-action-get-latest-release@master
with:
owner: anomalyco
repo: opencode
excludes: prerelease, draft
- name: Run Pixi Task
run: |
cd opencode
# 获取当前版本
version=v$(pixi search -q --no-progress -p ${{ matrix.platform }} -c https://prefix.dev/sylens opencode | grep -oP '\K[0-9]+\.[0-9]+\.[0-9]+' | head -1)
echo "Origin Release: ${{ steps.origin_release.outputs.release }}"
echo "Current Version: $version"
# 比较版本是否一致
if [ "${{ steps.origin_release.outputs.release }}" != "$version" ]; then
echo "Version mismatch, starting build..."
pixi run build ${{ matrix.platform }}
pixi upload prefix opencode*.conda -c sylens
else
echo "No new release"
fi