Merge branch 'main' of ssh://git-ssh.codegang.top:222/yiyi/mcmtrdy

This commit is contained in:
yiyi
2026-07-04 15:40:40 +08:00
2 changed files with 17 additions and 7 deletions
+17 -7
View File
@@ -7,6 +7,15 @@ on:
description: '要运行的分支'
required: true
default: 'main'
release_type:
description: '发布类型'
required: true
type: choice
options:
- client
- server
- both
default: 'both'
jobs:
release:
@@ -31,7 +40,7 @@ jobs:
# 创建发布
- name: Create Release
if: github.ref_name == 'client'
if: github.event.inputs.release_type == 'client' || github.event.inputs.release_type == 'both'
uses: https://gitea.com/actions/gitea-release-action@v1
with:
tag_name: ${{ env.VERSION }}
@@ -42,28 +51,28 @@ jobs:
# 初始化并配置 Rclone
- name: Setup Rclone
if: github.ref_name == 'client'
if: github.event.inputs.release_type == 'client' || github.event.inputs.release_type == 'both'
run: |
curl https://rclone.org/install.sh | sudo bash
sudo dpkg -i action-file/rclone-current-linux-amd64.deb
mkdir -p ~/.config/rclone
echo "${{ secrets.RCLONE_CONFIG }}" | base64 -d > ~/.config/rclone/rclone.conf
# # 上传 modpack 档案
- name: Upload Modpack
if: github.ref_name == 'client'
if: github.event.inputs.release_type == 'client' || github.event.inputs.release_type == 'both'
run: |
rclone copyto dist/client/mcmtrdy-modpack.zip mcmtrdy:mcmtrdy/mcmtrdy.zip
rclone sync ./dist/client/modpack mcmtrdy:mcmtrdy/modpack
# 清除配置
- name: Clear config
if: github.ref_name == 'client'
if: github.event.inputs.release_type == 'client' || github.event.inputs.release_type == 'both'
run: |
rm -rf ~/.config/rclone/rclone.conf
# 创建服务器mod
- name: Create Server Mod
if: github.ref_name == 'server'
if: github.event.inputs.release_type == 'server' || github.event.inputs.release_type == 'both'
run: |
mkdir -p dist/server
@@ -96,6 +105,7 @@ jobs:
# 同步 mods 到远程服务器
- name: Sync Server Mods
if: github.event.inputs.release_type == 'server' || github.event.inputs.release_type == 'both'
run: |
sudo apt update -y
sudo apt install -y sshpass rsync
@@ -109,7 +119,7 @@ jobs:
# 安装 mcrcon 并发送 RCON 指令
- name: RCON Broadcast
if: github.ref_name == 'server'
if: github.event.inputs.release_type == 'server' || github.event.inputs.release_type == 'both'
run: |
# 安装 mcrcon
sudo apt update -y
Binary file not shown.