name: Release on: push: branches: [main] paths: - "share/const.go" jobs: release: strategy: matrix: go: [1.17] platform: [ubuntu-latest, macos-11] runs-on: ${{ matrix.platform }} 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: 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 V8Go uses: actions/checkout@v2 with: repository: rogchap/v8go ref: 5e91d3d9dcabd2986f901b6b31590e49fc3c4dd8 path: v8go - name: Checkout UI uses: actions/checkout@v2 with: repository: yaoapp/xgen path: ui token: ${{ secrets.TOKEN }} - name: Move Kun, Xun, Gou, UI, V8Go run: | mv kun ../ mv xun ../ mv gou ../ mv v8go ../ 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 Linux if: matrix.platform == 'ubuntu-latest' run: | make artifacts - name: Make Artifacts MacOS if: matrix.platform == 'macos-11' run: | make artifacts-macos - name: Push to Station (@Silicon Valley) uses: nogsantos/scp-deploy@master with: src: ./dist/release/* host: ${{ secrets.SSH_HOST }} remote: /data/release/ui/download/ 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 }}