feat: update workflow and docker

This commit is contained in:
sunjuzhong 2025-03-07 14:12:28 +08:00
parent c6f6242dd2
commit 88636c8f0e
6 changed files with 58 additions and 10 deletions

View file

@ -5,17 +5,32 @@ on:
inputs:
tags:
description: "Version tags"
required: true
type: string
jobs:
build:
runs-on: "ubuntu-latest"
container:
image: sjzsdu/yao-build:0.10.4
options: --privileged
volumes:
- /data:/data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GO111MODULE: on
GOPROXY: https://goproxy.cn,direct
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
path: /app/yao
- name: Build
run: |
export PATH=$PATH:/github/home/go/bin
cd /app
/app/build.sh
ls -l /data
@ -25,3 +40,16 @@ jobs:
name: yao-linux
path: |
/data/*
- name: Create Release
uses: softprops/action-gh-release@v1
if: success()
continue-on-error: true
with:
tag_name: ${{ github.event.inputs.tags }}
name: Release ${{ github.event.inputs.tags }}
files: /data/*
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View file

@ -125,3 +125,14 @@ jobs:
name: yao-macos
path: |
dist/release/*
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
continue-on-error: true
with:
tag_name: v${{ env.VERSION }}
name: Release v${{ env.VERSION }}
draft: false
prerelease: false
files: dist/release/*

View file

@ -1,3 +1,9 @@
## Install Yao
```
curl -sSL https://github.com/sjzsdu/yao/raw/master/get-wn.sh | bash
```
## What is Yao?
Yao is an all-in-one application engine that enables developers to create web apps, REST APIs, business applications, and more, with AI as a development partner.

View file

@ -1,5 +1,11 @@
# Yao
## 安装 Yao
```
curl -sSL https://github.com/sjzsdu/yao/raw/master/get-wn.sh | bash
```
[![UnitTest](https://github.com/YaoApp/yao/actions/workflows/unit-test.yml/badge.svg)](https://github.com/YaoApp/yao/actions/workflows/unit-test.yml)
[![codecov](https://codecov.io/gh/YaoApp/yao/branch/main/graph/badge.svg?token=294Y05U71J)](https://codecov.io/gh/YaoApp/yao)

View file

@ -40,15 +40,6 @@ RUN curl -fsSL https://deb.nodesource.com/setup_18.x | bash - && \
RUN npm install -g pnpm
# Install AWS CLI
RUN curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip" && \
unzip awscliv2.zip && \
./aws/install && \
rm -rf awscliv2.zip && \
rm -rf aws && \
aws --version
# RUN npm install -g pnpm
RUN chmod +x /app/build.sh
VOLUME [ "/data" ]

View file

@ -1,4 +1,10 @@
#!/bin/bash
set -e
# 确保目录存在并设置权限
mkdir -p /data
chmod 777 /data
cd /app && \
git clone https://github.com/yaoapp/kun.git /app/kun && \
git clone https://github.com/yaoapp/xun.git /app/xun && \
@ -22,4 +28,4 @@ cd /app/yao && \
export VERSION=$(cat share/const.go |grep 'const VERSION' | awk '{print $4}' | sed "s/\"//g")
cd /app/yao && make tools && make artifacts-linux
mv /app/yao/dist/release/* /data/%
mv /app/yao/dist/release/* /data/