Merge pull request #346 from trheyi/main
[add] release v0.10.3-pre action workflow
This commit is contained in:
commit
d46c13a19e
3 changed files with 395 additions and 0 deletions
86
.github/workflows/release-v0.10.3-pre-docker.yml
vendored
Normal file
86
.github/workflows/release-v0.10.3-pre-docker.yml
vendored
Normal file
|
|
@ -0,0 +1,86 @@
|
|||
name: Release v0.10.3-pre Docker
|
||||
|
||||
on:
|
||||
# push:
|
||||
# branches: [main]
|
||||
# paths:
|
||||
# - ".github/workflows/docker.yml"
|
||||
workflow_run:
|
||||
workflows: ["Release v0.10.3-pre Linux"]
|
||||
types:
|
||||
- completed
|
||||
|
||||
env:
|
||||
VERSION: 0.10.3
|
||||
jobs:
|
||||
build:
|
||||
if: ${{ github.event.workflow_run.conclusion == 'success' }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: v0.10.3-pre
|
||||
|
||||
- name: Get Version
|
||||
run: |
|
||||
echo VERSION=$(cat share/const.go |grep 'const VERSION' | awk '{print $4}' | sed "s/\"//g") >> $GITHUB_ENV
|
||||
|
||||
- name: Check Version
|
||||
run: echo $VERSION
|
||||
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v1
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v1
|
||||
|
||||
- name: Login to DockerHub
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKER_USER }}
|
||||
password: ${{ secrets.DOCKER_TOKEN }}
|
||||
|
||||
- name: Build Development
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./docker/development
|
||||
platforms: linux/amd64
|
||||
build-args: |
|
||||
VERSION=${{ env.VERSION }}
|
||||
ARCH=amd64
|
||||
push: true
|
||||
tags: yaoapp/yao:${{ env.VERSION }}-amd64-dev
|
||||
|
||||
- name: Build Development Arm64
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./docker/development
|
||||
platforms: linux/arm64
|
||||
build-args: |
|
||||
VERSION=${{ env.VERSION }}
|
||||
ARCH=arm64
|
||||
push: true
|
||||
tags: yaoapp/yao:${{ env.VERSION }}-arm64-dev
|
||||
|
||||
- name: Build Production
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./docker/production
|
||||
platforms: linux/amd64
|
||||
build-args: |
|
||||
VERSION=${{ env.VERSION }}
|
||||
ARCH=amd64
|
||||
push: true
|
||||
tags: yaoapp/yao:${{ env.VERSION }}-amd64
|
||||
|
||||
- name: Build Production Arm64
|
||||
uses: docker/build-push-action@v2
|
||||
with:
|
||||
context: ./docker/production
|
||||
platforms: linux/arm64
|
||||
build-args: |
|
||||
VERSION=${{ env.VERSION }}
|
||||
ARCH=arm64
|
||||
push: true
|
||||
tags: yaoapp/yao:${{ env.VERSION }}-arm64
|
||||
154
.github/workflows/release-v0.10.3-pre-linux.yml
vendored
Normal file
154
.github/workflows/release-v0.10.3-pre-linux.yml
vendored
Normal file
|
|
@ -0,0 +1,154 @@
|
|||
name: Release v0.10.3-pre Linux
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tags:
|
||||
description: "Version tags"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
strategy:
|
||||
matrix:
|
||||
go: [1.20.0]
|
||||
runs-on: "ubuntu-20.04"
|
||||
steps:
|
||||
- name: Arm Build
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc
|
||||
sudo apt-get install -y gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
|
||||
sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
|
||||
sudo apt-get install -y g++-aarch64-linux-gnu crossbuild-essential-arm64
|
||||
|
||||
- name: Install coscmd
|
||||
run: sudo pip3 install coscmd
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Install pnpm
|
||||
run: npm install -g pnpm
|
||||
|
||||
- name: Setup Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Checkout Kun
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: yaoapp/kun
|
||||
path: kun
|
||||
|
||||
- name: Checkout Xun
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: yaoapp/xun
|
||||
path: xun
|
||||
|
||||
- name: Checkout Gou
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: yaoapp/gou
|
||||
ref: dc3d98411f61e21cf775e4c82d92d5ac2acfc03c
|
||||
path: gou
|
||||
|
||||
- name: Checkout V8Go
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: rogchap/v8go
|
||||
ref: 5e91d3d9dcabd2986f901b6b31590e49fc3c4dd8
|
||||
path: v8go
|
||||
|
||||
- name: Download XGen v0.9
|
||||
uses: dsaltares/fetch-gh-release-asset@master
|
||||
with:
|
||||
repo: "yaoapp/xgen-deprecated"
|
||||
version: "tags/v0.9.0"
|
||||
file: "xgen-v0.9-dist.tar.gz"
|
||||
|
||||
- name: Checkout XGen v1.0
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: yaoapp/xgen
|
||||
#ref: 408470b84c9d6bb8ed988b545b6e46ffc2872014
|
||||
path: xgen-v1.0
|
||||
|
||||
- name: Checkout Yao-Init
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: yaoapp/yao-init
|
||||
path: yao-init
|
||||
|
||||
- name: Move Kun, Xun, Gou, UI, V8Go
|
||||
run: |
|
||||
tar xvfz xgen-v0.9-dist.tar.gz
|
||||
rm xgen-v0.9-dist.tar.gz
|
||||
mv kun ../
|
||||
mv xun ../
|
||||
mv gou ../
|
||||
mv v8go ../
|
||||
mv v0.9 ../xgen-v0.9
|
||||
mv xgen-v1.0 ../
|
||||
mv yao-init ../
|
||||
ls -l .
|
||||
ls -l ../
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: v0.10.3-pre
|
||||
|
||||
- name: Setup Go ${{ matrix.go }}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Setup Go Tools
|
||||
run: |
|
||||
make tools
|
||||
|
||||
- name: Make Artifacts Linux
|
||||
run: |
|
||||
make artifacts-linux
|
||||
|
||||
- name: Configure COS For Silicon Valley
|
||||
env:
|
||||
SECRET_ID: ${{ secrets.COS_ID }}
|
||||
SECRET_KEY: ${{ secrets.COS_KEY }}
|
||||
BUCKET: release-sv-1252011659
|
||||
REGION: na-siliconvalley
|
||||
run: |
|
||||
coscmd config -a $SECRET_ID -s $SECRET_KEY -b $BUCKET -r $REGION
|
||||
|
||||
- name: Push To Silicon Valley
|
||||
run: |
|
||||
for file in ./dist/release/*; do coscmd upload $file /archives/; done;
|
||||
|
||||
- name: Archive production artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: yao-linux
|
||||
path: |
|
||||
dist/release/*
|
||||
|
||||
# - name: Configure COS For Beijing
|
||||
# env:
|
||||
# SECRET_ID: ${{ secrets.COS_ID }}
|
||||
# SECRET_KEY: ${{ secrets.COS_KEY }}
|
||||
# BUCKET: release-bj-1252011659
|
||||
# REGION: ap-beijing
|
||||
# run: |
|
||||
# coscmd config -a $SECRET_ID -s $SECRET_KEY -b $BUCKET -r $REGION
|
||||
|
||||
# - name: Push To Beijing
|
||||
# run: |
|
||||
# for file in ./dist/release/*; do coscmd upload $file /archives/; done;
|
||||
155
.github/workflows/release-v0.10.3-pre-macos.yml
vendored
Normal file
155
.github/workflows/release-v0.10.3-pre-macos.yml
vendored
Normal file
|
|
@ -0,0 +1,155 @@
|
|||
name: Release v0.10.3-pre MacOS
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
tags:
|
||||
description: "Version tags"
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- "share/const.go"
|
||||
|
||||
jobs:
|
||||
release:
|
||||
strategy:
|
||||
matrix:
|
||||
go: [1.20.0]
|
||||
runs-on: "macos-12"
|
||||
steps:
|
||||
- name: Install coscmd
|
||||
run: |
|
||||
sudo /Library/Frameworks/Python.framework/Versions/3.11/bin/python -m pip install --upgrade pip
|
||||
sudo pip3 install coscmd
|
||||
echo "/Library/Frameworks/Python.framework/Versions/3.11/bin" >> $GITHUB_PATH
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 18
|
||||
|
||||
- name: Install pnpm
|
||||
run: npm install -g pnpm
|
||||
|
||||
- name: Setup Cache
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: |
|
||||
~/.cache/go-build
|
||||
~/go/pkg/mod
|
||||
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-go-
|
||||
|
||||
- name: Checkout Kun
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: yaoapp/kun
|
||||
path: kun
|
||||
|
||||
- name: Checkout Xun
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: yaoapp/xun
|
||||
path: xun
|
||||
|
||||
- name: Checkout Gou
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: yaoapp/gou
|
||||
ref: dc3d98411f61e21cf775e4c82d92d5ac2acfc03c
|
||||
path: gou
|
||||
|
||||
- name: Checkout V8Go
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: rogchap/v8go
|
||||
ref: 5e91d3d9dcabd2986f901b6b31590e49fc3c4dd8
|
||||
path: v8go
|
||||
|
||||
- name: Download XGen v0.9
|
||||
uses: dsaltares/fetch-gh-release-asset@master
|
||||
with:
|
||||
repo: "yaoapp/xgen-deprecated"
|
||||
version: "tags/v0.9.0"
|
||||
file: "xgen-v0.9-dist.tar.gz"
|
||||
|
||||
- name: Checkout XGen v1.0
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: yaoapp/xgen
|
||||
# ref: 408470b84c9d6bb8ed988b545b6e46ffc2872014
|
||||
path: xgen-v1.0
|
||||
|
||||
- name: Checkout Yao-Init
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
repository: yaoapp/yao-init
|
||||
path: yao-init
|
||||
|
||||
- name: Move Kun, Xun, Gou, UI, V8Go
|
||||
run: |
|
||||
tar xvfz xgen-v0.9-dist.tar.gz
|
||||
rm xgen-v0.9-dist.tar.gz
|
||||
mv kun ../
|
||||
mv xun ../
|
||||
mv gou ../
|
||||
mv v8go ../
|
||||
mv v0.9 ../xgen-v0.9
|
||||
mv xgen-v1.0 ../
|
||||
mv yao-init ../
|
||||
rm -f ../xgen-v1.0/packages/setup/vite.config.ts.*
|
||||
ls -l .
|
||||
ls -l ../
|
||||
ls -l ../xgen-v1.0/packages/setup/
|
||||
|
||||
- name: Checkout Code
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
ref: v0.10.3-pre
|
||||
|
||||
- name: Setup Go ${{ matrix.go }}
|
||||
uses: actions/setup-go@v3
|
||||
with:
|
||||
go-version: ${{ matrix.go }}
|
||||
|
||||
- name: Setup Go Tools
|
||||
run: |
|
||||
make tools
|
||||
|
||||
- name: Make Artifacts MacOS
|
||||
run: |
|
||||
make artifacts-macos
|
||||
|
||||
- name: Configure COS For Silicon Valley
|
||||
env:
|
||||
SECRET_ID: ${{ secrets.COS_ID }}
|
||||
SECRET_KEY: ${{ secrets.COS_KEY }}
|
||||
BUCKET: release-sv-1252011659
|
||||
REGION: na-siliconvalley
|
||||
run: |
|
||||
coscmd config -a $SECRET_ID -s $SECRET_KEY -b $BUCKET -r $REGION
|
||||
|
||||
- name: Push To Silicon Valley
|
||||
run: |
|
||||
for file in ./dist/release/*; do coscmd upload $file /archives/; done;
|
||||
|
||||
- name: Archive production artifacts
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: yao-macos
|
||||
path: |
|
||||
dist/release/*
|
||||
|
||||
# - name: Configure COS For Beijing
|
||||
# env:
|
||||
# SECRET_ID: ${{ secrets.COS_ID }}
|
||||
# SECRET_KEY: ${{ secrets.COS_KEY }}
|
||||
# BUCKET: release-bj-1252011659
|
||||
# REGION: ap-beijing
|
||||
# run: |
|
||||
# coscmd config -a $SECRET_ID -s $SECRET_KEY -b $BUCKET -r $REGION
|
||||
|
||||
# - name: Push To Beijing
|
||||
# run: |
|
||||
# for file in ./dist/release/*; do coscmd upload $file /archives/; done;
|
||||
Loading…
Add table
Reference in a new issue