Skip to content
This repository was archived by the owner on Dec 23, 2025. It is now read-only.

Commit 7f4a32d

Browse files
committed
chore: release v0.2.0
1 parent 48d01a1 commit 7f4a32d

4 files changed

Lines changed: 165 additions & 258 deletions

File tree

.github/workflows/release.yml

Lines changed: 21 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -22,24 +22,31 @@ jobs:
2222
- target: x86_64-unknown-linux-gnu
2323
os: ubuntu-latest
2424
archive: tar.gz
25+
use_cross: false
2526
- target: x86_64-unknown-linux-musl
2627
os: ubuntu-latest
2728
archive: tar.gz
29+
use_cross: true
2830
- target: aarch64-unknown-linux-gnu
2931
os: ubuntu-latest
3032
archive: tar.gz
33+
use_cross: true
3134
- target: aarch64-unknown-linux-musl
3235
os: ubuntu-latest
3336
archive: tar.gz
37+
use_cross: true
3438
- target: x86_64-apple-darwin
3539
os: macos-latest
3640
archive: tar.gz
41+
use_cross: false
3742
- target: aarch64-apple-darwin
3843
os: macos-latest
3944
archive: tar.gz
45+
use_cross: false
4046
- target: x86_64-pc-windows-msvc
4147
os: windows-latest
4248
archive: zip
49+
use_cross: false
4350

4451
runs-on: ${{ matrix.os }}
4552
steps:
@@ -51,45 +58,20 @@ jobs:
5158
with:
5259
targets: ${{ matrix.target }}
5360

54-
- name: Install cross-compilation tools (Linux)
55-
if: matrix.os == 'ubuntu-latest'
56-
run: |
57-
sudo apt-get update
58-
case "${{ matrix.target }}" in
59-
x86_64-unknown-linux-musl)
60-
sudo apt-get install -y musl-tools
61-
;;
62-
aarch64-unknown-linux-gnu)
63-
sudo apt-get install -y gcc-aarch64-linux-gnu
64-
;;
65-
aarch64-unknown-linux-musl)
66-
# Install aarch64 musl cross compiler from musl.cc
67-
wget -q https://musl.cc/aarch64-linux-musl-cross.tgz
68-
tar -xzf aarch64-linux-musl-cross.tgz
69-
echo "$PWD/aarch64-linux-musl-cross/bin" >> $GITHUB_PATH
70-
;;
71-
esac
72-
73-
- name: Configure cargo for cross-compilation
74-
if: matrix.os == 'ubuntu-latest'
75-
run: |
76-
mkdir -p .cargo
77-
case "${{ matrix.target }}" in
78-
aarch64-unknown-linux-gnu)
79-
cat >> .cargo/config.toml << 'EOF'
80-
[target.aarch64-unknown-linux-gnu]
81-
linker = "aarch64-linux-gnu-gcc"
82-
EOF
83-
;;
84-
aarch64-unknown-linux-musl)
85-
cat >> .cargo/config.toml << 'EOF'
86-
[target.aarch64-unknown-linux-musl]
87-
linker = "aarch64-linux-musl-gcc"
88-
EOF
89-
;;
90-
esac
91-
92-
- name: Build
61+
- name: Install cross
62+
if: matrix.use_cross
63+
run: cargo install cross --git https://github.com/cross-rs/cross
64+
65+
- name: Install musl-tools (x86_64-musl without cross)
66+
if: matrix.target == 'x86_64-unknown-linux-musl' && !matrix.use_cross
67+
run: sudo apt-get update && sudo apt-get install -y musl-tools
68+
69+
- name: Build with cross
70+
if: matrix.use_cross
71+
run: cross build --release --target ${{ matrix.target }} -p relay-server
72+
73+
- name: Build with cargo
74+
if: ${{ !matrix.use_cross }}
9375
run: cargo build --release --target ${{ matrix.target }} -p relay-server
9476

9577
- name: Get version

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@
77

88
## [Unreleased]
99

10+
## [0.2.0] - 2025-12-04
11+
1012
### Added
1113

1214
- 新增 `unavailable_cooldown_seconds` 配置选项,可自定义账户失效后的冷却时间(默认 3600 秒)

0 commit comments

Comments
 (0)