Skip to content

Commit ab96a2a

Browse files
committed
v0.1.7
1 parent 62cfad9 commit ab96a2a

File tree

3 files changed

+72
-67
lines changed

3 files changed

+72
-67
lines changed

.github/workflows/build.yml

Lines changed: 0 additions & 65 deletions
This file was deleted.

.github/workflows/release-plz.yml

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,26 @@ on:
99
branches:
1010
- main
1111

12+
env:
13+
CARGO_INCREMENTAL: 0
14+
CARGO_NET_GIT_FETCH_WITH_CLI: true
15+
CARGO_NET_RETRY: 10
16+
CARGO_TERM_COLOR: always
17+
RUST_BACKTRACE: 1
18+
RUSTFLAGS: -D warnings
19+
RUSTUP_MAX_RETRIES: 10
20+
21+
defaults:
22+
run:
23+
shell: bash
24+
1225
jobs:
13-
release-plz:
26+
release:
1427
name: Release-plz
1528
runs-on: ubuntu-latest
29+
outputs:
30+
releases_created: ${{ steps.release-plz.outputs.releases_created }}
31+
tag: ${{ fromJSON(steps.release-plz.outputs.releases)[0].tag }}
1632
steps:
1733
- name: Checkout repository
1834
uses: actions/checkout@v4
@@ -21,10 +37,64 @@ jobs:
2137
- name: Install Rust toolchain
2238
uses: dtolnay/rust-toolchain@stable
2339
- name: Run release-plz
40+
id: release-plz
2441
uses: MarcoIeni/[email protected]
2542
with:
2643
command: release
2744
manifest_path: Cargo.toml
2845
env:
2946
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3047
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
48+
- name: Read release output
49+
env:
50+
TAG: ${{ fromJSON(steps.release-plz.outputs.releases)[0].tag }}
51+
RELEASES_CREATED: ${{ steps.release-plz.outputs.releases_created }}
52+
run: |
53+
set -e
54+
echo "releases_created: $RELEASES_CREATED"
55+
echo "release_tag: $TAG"
56+
57+
upload-assets:
58+
name: ${{ matrix.target }}
59+
needs: release
60+
if: github.repository_owner == 'rming' && needs.release.outputs.releases_created == 'true'
61+
runs-on: ${{ matrix.os }}
62+
strategy:
63+
matrix:
64+
include:
65+
- target: aarch64-unknown-linux-gnu
66+
os: ubuntu-latest
67+
- target: aarch64-apple-darwin
68+
os: macos-latest
69+
- target: aarch64-pc-windows-msvc
70+
os: windows-latest
71+
- target: x86_64-unknown-linux-gnu
72+
os: ubuntu-latest
73+
- target: x86_64-apple-darwin
74+
os: macos-latest
75+
- target: x86_64-pc-windows-msvc
76+
os: windows-latest
77+
timeout-minutes: 60
78+
steps:
79+
- name: Checkout repository
80+
uses: actions/checkout@v4
81+
- name: Install Rust toolchain
82+
uses: dtolnay/rust-toolchain@stable
83+
- uses: taiki-e/setup-cross-toolchain-action@v1
84+
with:
85+
target: ${{ matrix.target }}
86+
if: startsWith(matrix.os, 'ubuntu')
87+
88+
- name: RUSTFLAGS for Windows
89+
if: endsWith(matrix.target, 'windows-msvc')
90+
run: |
91+
echo "RUSTFLAGS=${RUSTFLAGS} -C target-feature=+crt-static" >> "${GITHUB_ENV}"
92+
93+
- uses: taiki-e/upload-rust-binary-action@v1
94+
with:
95+
bin: dify-openai-apis
96+
target: ${{ matrix.target }}
97+
tar: all
98+
zip: windows
99+
token: ${{ secrets.GITHUB_TOKEN }}
100+
ref: "refs/tags/${{ needs.release.outputs.tag }}"

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "dify-openai-apis"
3-
version = "0.1.3"
3+
version = "0.1.7"
44
edition = "2021"
55
description = "OpenAI-compatible APIs for Dify platform services"
66
license = "Apache-2.0"

0 commit comments

Comments
 (0)