diff --git a/.github/workflows/build-linux.yml b/.github/workflows/build-linux.yml index 34c10c52..baf4b2c1 100644 --- a/.github/workflows/build-linux.yml +++ b/.github/workflows/build-linux.yml @@ -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 }} diff --git a/.github/workflows/build-macos.yml b/.github/workflows/build-macos.yml index a26c4425..3242ac88 100644 --- a/.github/workflows/build-macos.yml +++ b/.github/workflows/build-macos.yml @@ -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/* diff --git a/README.md b/README.md index 27f3424b..ea9e9e6a 100644 --- a/README.md +++ b/README.md @@ -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. diff --git a/README.zh-CN.md b/README.zh-CN.md index 4b702877..f25ee572 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -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) diff --git a/docker/build/Dockerfile b/docker/build/Dockerfile index b91a9c14..30bb33f4 100644 --- a/docker/build/Dockerfile +++ b/docker/build/Dockerfile @@ -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" ] diff --git a/docker/build/build.sh b/docker/build/build.sh index 619d22d7..f469e3f0 100644 --- a/docker/build/build.sh +++ b/docker/build/build.sh @@ -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/% \ No newline at end of file +mv /app/yao/dist/release/* /data/ \ No newline at end of file