Skip to content

Commit

Permalink
add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
hanwckf committed Feb 15, 2022
1 parent 655f8c3 commit 42c9d24
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 31 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: CI

# Controls when the action will run.
on:
push:
pull_request:
workflow_dispatch:
release:
types: [published]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
build:
name: build
runs-on: ubuntu-20.04
if: ${{ !(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')) }}
steps:
- uses: actions/checkout@v2
- name: Start build
run: |
make all ARCH=mips24kec BUILD_STATIC=y && mv trojan trojan-mips24kec-static
make clean
make all ARCH=mips1004kec BUILD_STATIC=y && mv trojan trojan-mips1004kec-static
make clean
make all ARCH=aarch64 BUILD_STATIC=y && mv trojan trojan-aarch64-static
make clean
make all ARCH=armhf BUILD_STATIC=y && mv trojan trojan-armhf-static
- name: Create archive
if: ${{ github.event_name != 'release' && success() }}
run: |
ls -lh trojan-*
tar -cvJf trojan-static.tar.xz trojan-*
- name: Upload images to Artifact
if: ${{ github.event_name != 'release' && success() }}
uses: actions/upload-artifact@v2.2.1
with:
name: trojan-static
path: trojan-static.tar.xz
- name: Upload images to Releases
if: ${{ github.event_name == 'release' && success() }}
uses: svenstaro/upload-release-action@2.2.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: trojan-*
tag: ${{ github.ref }}
overwrite: true
file_glob: true
31 changes: 0 additions & 31 deletions .travis.yml

This file was deleted.

0 comments on commit 42c9d24

Please sign in to comment.