fix: 修复 Gitea 发布工作流在 fork/镜像仓库中的兼容性问题 #1
@@ -39,21 +39,26 @@ jobs:
|
||||
set -eux
|
||||
if command -v apt-get >/dev/null 2>&1; then
|
||||
apt-get update
|
||||
apt-get install -y build-essential pkg-config sqlite3 curl tar ca-certificates nodejs npm
|
||||
apt-get install -y build-essential pkg-config sqlite3 curl tar ca-certificates nodejs npm rustc cargo
|
||||
elif command -v dnf >/dev/null 2>&1; then
|
||||
dnf install -y gcc gcc-c++ make pkgconf-pkg-config sqlite curl tar ca-certificates nodejs npm
|
||||
dnf install -y gcc gcc-c++ make pkgconf-pkg-config sqlite curl tar ca-certificates nodejs npm rust cargo
|
||||
elif command -v yum >/dev/null 2>&1; then
|
||||
yum install -y gcc gcc-c++ make pkgconfig sqlite curl tar ca-certificates nodejs npm
|
||||
yum install -y gcc gcc-c++ make pkgconfig sqlite curl tar ca-certificates nodejs npm rust cargo
|
||||
elif command -v pacman >/dev/null 2>&1; then
|
||||
pacman -Sy --noconfirm base-devel pkgconf sqlite curl tar ca-certificates nodejs npm
|
||||
pacman -Sy --noconfirm base-devel pkgconf sqlite curl tar ca-certificates nodejs npm rust cargo
|
||||
fi
|
||||
|
||||
- name: 安装 Rust
|
||||
run: |
|
||||
set -eux
|
||||
if [ -f "$HOME/.cargo/env" ]; then
|
||||
. "$HOME/.cargo/env"
|
||||
fi
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
if ! command -v cargo >/dev/null 2>&1; then
|
||||
curl --proto '=https' --tlsv1.2 -fsSL https://sh.rustup.rs | sh -s -- -y --profile minimal
|
||||
. "$HOME/.cargo/env"
|
||||
export PATH="$HOME/.cargo/bin:$PATH"
|
||||
fi
|
||||
rustc -V
|
||||
cargo -V
|
||||
|
||||
Reference in New Issue
Block a user