Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

engsr6982/upload-minebbs

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Repository files navigation

upload-minebbs

这是一个 GitHub Action,用于将 GitHub Release 自动同步到 MineBBS。

输入参数

输入参数:

参数名 描述 是否必须 默认值
minebbs_token MineBBS 的开发者 token
resource_id 需要更新的资源 ID
use_extern_url 是否使用外部链接 false
custom_extern_url 自定义外部下载链接地址(留空使用GitHub release地址)
upload_file 需要上传的文件
update_title 更新标题(留空默认使用Release标题)
update_description 更新描述(留空默认使用Release内容)
update_version 要更新的版本号(留空默认使用Tag)

Warning

use_extern_urlupload_file 必须选择一个作为更新方式,否则更新失败
upload_file 提供的文件不能大于10Mb(API接口限制)

API 允许上传的文件扩展名
.zip
.7z
rar
.tar
.pdf
.psd
.phar
.mcpack
.mcworld
.mcaddon
.jar
.apk
.exe
.js
.json
.dll
.py
.bnpx

使用示例

name: Sync Release to MineBBS

on:
    release:
        types: [created] # 当创建新的发布时触发

jobs:
    upload:
        runs-on: ubuntu-latest # 运行环境
        steps:
            - name: Checkout code
              uses: actions/checkout@v2 # 检出代码

            # 简单写法
            - name: Upload to MineBBS with upload_file
              uses: engsr6982/upload-minebbs@v1
              with:
                  minebbs_token: ${{ secrets.MINEBBS_TOKEN }} # 使用密钥
                  resource_id: "12345" # 资源 ID
                  upload_file: path/to/your/file.zip # 指定上传文件的路径

            # 使用外部链接
            - name: Upload to MineBBS with use_extern_url
              uses: engsr6982/upload-minebbs@v1
              with:
                  minebbs_token: ${{ secrets.MINEBBS_TOKEN }} # 使用密钥
                  resource_id: "12345" # 资源 ID
                  use_extern_url: true

            # 自定义写法
            - name: Upload to MineBBS with use_extern_url
              uses: engsr6982/upload-minebbs@v1
              with:
                  minebbs_token: ${{ secrets.MINEBBS_TOKEN }} # 使用密钥
                  resource_id: "12345" # 资源 ID
                  upload_file: path/to/your/file.zip # 指定上传文件的路径
                  update_title: "Github Actions Sync"

开发

  • 更改 index.js 后,执行以下命令进行编译
npm i -g @vercel/ncc

ncc build index.js --license licenses.txt

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published