Skip to content

Build

Build #23

Workflow file for this run

name: Build
on:
push:
branches:
- master
watch:
types: [started]
jobs:
build:
runs-on: ubuntu-latest
if: github.event.repository.owner.id == github.event.sender.id
steps:
- name: Checkout
uses: actions/checkout@master
- name: Initialize environment
env:
DEBIAN_FRONTEND: noninteractive
run: |
sudo apt-get -y install p7zip-full
- name: Build
id: build
run: |
wget https://api.github.com/repos/trojan-gfw/trojan/releases/latest >/dev/null 2>&1
trojan_version=`grep tag_name latest| awk -F '[:,"v]' '{print $6}'`
echo "::set-output name=version::${trojan_version}"
make all Trojan_VERSION=${trojan_version} ARCH=mips24kec BUILD_STATIC=y && mv trojan trojan-mips24kec-uclibc-static
make clean
make all Trojan_VERSION=${trojan_version} ARCH=mips1004kec BUILD_STATIC=y && mv trojan trojan-mips1004kec-uclibc-static
make clean
make all Trojan_VERSION=${trojan_version} ARCH=aarch64 BUILD_STATIC=y && mv trojan trojan-aarch64-musl-static
make clean
make all Trojan_VERSION=${trojan_version} ARCH=armhf BUILD_STATIC=y && mv trojan trojan-armhf-musl-static
mkdir -p /opt/images/
mv -f trojan-* /opt/images/
- name: Upload packages
uses: actions/upload-artifact@master
with:
name: trojan-${{ steps.build.outputs.version }}
path: /opt/images