-
Notifications
You must be signed in to change notification settings - Fork 660
49 lines (42 loc) · 1.27 KB
/
build-linux.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
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;