Build MacOS Artifacts #340
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build MacOS Artifacts | |
on: | |
workflow_dispatch: | |
inputs: | |
tags: | |
description: "Version tags" | |
env: | |
VERSION: 0.9.0 | |
jobs: | |
build: | |
strategy: | |
matrix: | |
go: [1.21.1] | |
runs-on: "macos-12" | |
steps: | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Install pnpm | |
run: npm install -g pnpm | |
- name: Setup Cache | |
uses: actions/cache@v4 | |
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@v4 | |
with: | |
repository: yaoapp/kun | |
path: kun | |
- name: Checkout Xun | |
uses: actions/checkout@v4 | |
with: | |
repository: yaoapp/xun | |
path: xun | |
- name: Checkout Gou | |
uses: actions/checkout@v4 | |
with: | |
repository: yaoapp/gou | |
path: gou | |
- name: Checkout V8Go | |
uses: actions/checkout@v4 | |
with: | |
repository: yaoapp/v8go | |
lfs: true | |
path: v8go | |
- name: Checkout XGen v1.0 | |
# ** XGEN will be renamed to DUI in the feature. and move to the new repository. ** | |
# ** new repository: https://github.com/YaoApp/dui.git ** | |
uses: actions/checkout@v4 | |
with: | |
repository: yaoapp/xgen | |
path: xgen-v1.0 | |
- name: Checkout Yao-Init | |
uses: actions/checkout@v4 | |
with: | |
repository: yaoapp/yao-init | |
path: yao-init | |
- name: Move Kun, Xun, Gou, UI, V8Go | |
run: | | |
mv kun ../ | |
mv xun ../ | |
mv gou ../ | |
mv v8go ../ | |
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@v4 | |
- name: Setup Go ${{ matrix.go }} | |
uses: actions/setup-go@v5 | |
with: | |
go-version: ${{ matrix.go }} | |
- name: Setup Go Tools | |
run: | | |
make tools | |
- name: Get Version | |
run: | | |
echo VERSION=$(cat share/const.go |grep 'const VERSION' | awk '{print $4}' | sed "s/\"//g") >> $GITHUB_ENV | |
- name: Make Artifacts MacOS | |
run: | | |
make artifacts-macos | |
mv dist/release/yao-$VERSION-dev-darwin-arm64 dist/release/yao-$VERSION-unstable-darwin-arm64 | |
mv dist/release/yao-$VERSION-dev-darwin-amd64 dist/release/yao-$VERSION-unstable-darwin-amd64 | |
# - name: Push arm64 To Silicon Valley | |
# uses: TencentCloud/cos-action@v1 | |
# with: | |
# secret_id: ${{ secrets.COS_ID }} | |
# secret_key: ${{ secrets.COS_KEY }} | |
# cos_bucket: release-sv-1252011659 | |
# cos_region: na-siliconvalley | |
# local_path: dist/release/yao-${{ env.VERSION }}-unstable-darwin-arm64 | |
# remote_path: /archives/yao-${{ env.VERSION }}-unstable-darwin-arm64 | |
# clean: false | |
# - name: Push amd64 To Silicon Valley | |
# uses: TencentCloud/cos-action@v1 | |
# with: | |
# secret_id: ${{ secrets.COS_ID }} | |
# secret_key: ${{ secrets.COS_KEY }} | |
# cos_bucket: release-sv-1252011659 | |
# cos_region: na-siliconvalley | |
# local_path: dist/release/yao-${{ env.VERSION }}-unstable-darwin-amd64 | |
# remote_path: /archives/yao-${{ env.VERSION }}-unstable-darwin-amd64 | |
# clean: false | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: yao-macos | |
path: | | |
dist/release/* |