Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
name: Build Filebrowser for Buckyos App

on:
workflow_dispatch:

jobs:
build-all-platforms:
name: Build All Platforms
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Write Identify File
run: |
mkdir -p ~/.buckycli
echo "${{secrets.NODE_IDENTIFY_BASE64}}" | base64 -d > ~/.buckycli/node_identity.json
echo "${{secrets.NODE_PRIVATE_KEY_BASE64}}" | base64 -d > ~/.buckycli/node_private_key.pem
echo "${{secrets.USER_CONFIG_BASE64}}" | base64 -d > ~/.buckycli/user_config.json
echo "${{secrets.USER_PRIVATE_KEY_BASE64}}" | base64 -d > ~/.buckycli/user_private_key.pem
- name: Download Buckycli
uses: actions/download-artifact@v5
with:
name: buckyos-tools-linux-amd64-0.5.1+build260116
github-token: ${{ secrets.GITHUB_TOKEN }}
repository: buckyos/buckyos
run-id: 21052409212
path: ${{github.workspace}}
- name: Check Buckycli and Identify Files
run: |
ls -la ~/.buckycli
ls -la ${{github.workspace}}/buckycli
chmod +x ${{github.workspace}}/buckycli
- uses: actions/setup-go@v6
with:
go-version: '1.25'
- name: Install Task
uses: go-task/setup-task@v1
- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: "latest"
- uses: actions/setup-node@v6
with:
node-version: "24.x"
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get Dapp Version
id: get_version
run: |
VERSION=$(python3 -c "import json; print(json.load(open('publish/app_pkg/pkg_meta.json'))['version'])")
echo "DAPP_VERSION=$VERSION" >> $GITHUB_OUTPUT
- name: Build Filebrowser Dapp
run: |
python3 build_dapp.py
- name: Pack Dapp
run: |
python3 pack_dapp.py
env:
BUCKYCLI_PATH: ${{github.workspace}}/buckycli
- name: Tar Dapp Package
run: |
tar -zvcf filebrowser.tar.gz -C /opt/buckyosci/apps buckyos_filebrowser
- name: Generate Release
uses: softprops/action-gh-release@v1
with:
tag_name: ${{ steps.get_version.outputs.DAPP_VERSION }}
name: filebrowser-${{ steps.get_version.outputs.DAPP_VERSION }}
generate_release_notes: true
fail_on_unmatched_files: true
files: filebrowser.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
115 changes: 0 additions & 115 deletions .github/workflows/ci.yaml

This file was deleted.

52 changes: 0 additions & 52 deletions .github/workflows/docs.yml

This file was deleted.

46 changes: 0 additions & 46 deletions .github/workflows/lint-pr.yaml

This file was deleted.

26 changes: 26 additions & 0 deletions HOW_TO_BUILD.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
以下说明适用于linux机器

## 准备依赖
- go task: https://taskfile.dev/docs/installation
- nodejs and pnpm: https://nodejs.org/zh-cn/download
- go: https://go.dev/doc/install
- 正确安装官方docker,需要buildx-plugin
- 执行`docker buildx create --use`
- `docker run --rm --privileged multiarch/qemu-user-static --reset -p yes`启用多平台支持
- 准备正确版本的buckycli程序和身份信息,打包环节需要用到

## 修改appdoc文件
修改`./publish/app.doc.json`文件:
- pkg_name: app包名,同一owner的包名必须不同
- version:版本号。推荐使用符合semver规则的三位数字版本号

## 编译-打包-发布流程
1. 在根目录下执行python3 build_dapp.py进行全平台编译
> 可以配置环境变量BUCKYOS_BUILD_ROOT,指定编译结果的输出目录。默认为`/opt/buckyosci`

> 编译结果输出到`${BUCKYOS_BUILD_ROOT}/app_build/${pkg_name}${version}`
2. 在根目录执行python3 pack_dapp.py进行打包操作
> 可以通过环境变量BUCKYCLI_PATH指定buckycli程序的位置,默认为`/opt/buckyos/bin/buckycli/buckycli`
> 正确的身份文件必须放置在~/.buckycli目录下

> 打包结果输出到`${BUCKYOS_BUILD_ROOT}/app/${pkg_name}${version}`
Loading