yao/.github/workflows/release.yml
Workflow config file is invalid. Please check your config file: yaml: line 18: could not find expected ':'
2022-01-24 19:09:44 +08:00

105 lines
2.8 KiB
YAML

name: Release
on:
push:
branches: [main]
# paths:
# - "share/const.go"
jobs:
release:
runs-on: ubuntu-latest
strategy:
matrix:
go: [1.17]
steps:
- name: arm env
run: |
apt-get update
apt-get install -y libc6-armel-cross libc6-dev-armel-cross binutils-arm-linux-gnueabi libncurses5-dev build-essential bison flex libssl-dev bc
apt-get install -y gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
- 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@v2
with:
repository: yaoapp/kun
path: kun
- name: Checkout Xun
uses: actions/checkout@v2
with:
repository: yaoapp/xun
path: xun
- name: Checkout Gou
uses: actions/checkout@v2
with:
repository: yaoapp/gou
path: gou
token: ${{ secrets.TOKEN }}
- name: Checkout UI
uses: actions/checkout@v2
with:
repository: yaoapp/xiang-ui
path: ui
token: ${{ secrets.TOKEN }}
- name: Move Kun, Xun, Gou, UI
run: |
mv kun ../
mv xun ../
mv gou ../
mv ui ../
ls -l .
ls -l ../
- name: Checkout Code
uses: actions/checkout@v2
- name: Setup Go ${{ matrix.go }}
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.go }}
- name: Setup Go Tools
run: |
if [[ "${GO111MODULE}" = "on" ]]; then go mod download; fi
if [[ "${GO111MODULE}" = "on" ]]; then export PATH="${GOPATH}/bin:${GOROOT}/bin:${PATH}"; fi
if [[ "${GO111MODULE}" = "on" ]]; then make tools; fi
go get github.com/go-bindata/go-bindata/...
go get github.com/elazarl/go-bindata-assetfs/...
- name: Make Artifacts
run: |
make artifacts
- name: Push to Station (@Silicon Valley)
uses: nogsantos/scp-deploy@master
with:
src: ./dist/release/*
host: ${{ secrets.SSH_HOST }}
remote: ${{ secrets.SSH_PATH }}
port: ${{ secrets.SSH_PORT }}
user: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
- name: Distribution
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.SSH_HOST }}
username: ${{ secrets.SSH_USER }}
key: ${{ secrets.SSH_KEY }}
port: ${{ secrets.SSH_PORT }}
script: ${{ secrets.SSH_CMD }}