Build Linux Artifacts #414
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 Linux Artifacts | |
on: | |
workflow_dispatch: | |
inputs: | |
tags: | |
description: "Version tags" | |
jobs: | |
build: | |
runs-on: "ubuntu-22.04" | |
container: | |
# DockerFile | |
# https://github.com/YaoApp/yao/blob/main/docker/build/Dockerfile | |
image: yaoapp/yao-build:0.10.4 | |
steps: | |
- name: Install Coscmd | |
run: | | |
apt-get install -y python3-venv | |
python3 -m venv /python3/venv | |
/python3/venv/bin/python -m pip install coscmd | |
/python3/venv/bin/coscmd -v | |
- 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: | | |
/python3/venv/bin/coscmd config -a $SECRET_ID -s $SECRET_KEY -b $BUCKET -r $REGION | |
- name: Build | |
run: | | |
export PATH=$PATH:/github/home/go/bin | |
/app/build.sh | |
ls -l /data | |
- name: Archive production artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: yao-linux | |
path: | | |
/data/* | |
- name: Push To Silicon Valley | |
run: | | |
for file in /data/*; do /python3/venv/bin/coscmd upload $file /archives/; done; |