Merge remote-tracking branch 'upstream/master' #262
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: ThingsLink Sunxi SOCs Firmware Build | |
# Controls when the action will run. Triggers the workflow on push or pull request | |
# events but only for the master branch | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# This workflow contains a single job called "build" | |
build: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- uses: actions/checkout@v2 | |
# Cache dl folder | |
- name: Cache | |
uses: actions/[email protected] | |
with: | |
# A list of files, directories, and wildcard patterns to cache and restore | |
path: dl | |
# An explicit key for restoring and saving the cache | |
key: x1_build_dl_cache | |
# echo key_build stuff | |
- name: Create key_build | |
env: | |
key_build: ${{ secrets.KEY_BUILD }} | |
key_build_pub: ${{ secrets.KEY_BUILD_PUB }} | |
run: | | |
echo "${{ env.key_build }}" > key-build | |
echo "${{ env.key_build_pub }}" > key-build.pub | |
md5sum key-build | |
md5sum key-build.pub | |
# Update feeds & install | |
- name: Feeds Update | |
run: ./scripts/feeds update -a | |
# Update feeds | |
- name: Feeds Install | |
run: ./scripts/feeds install -a | |
# Copy configuration | |
- name: X1 Configuration copy | |
run: cp .config_tlink_x1 .config | |
# Copy configuration | |
- name: Make Openwrt | |
run: make | |
# Copy configuration | |
- name: Configuration Copy K1 | |
run: cp .config_tlink_k1 .config | |
# Copy configuration | |
- name: Make K1 Firmware | |
run: make -j8 | |
# Copy configuration | |
- name: Configuration Copy BananaPi M2 Ultra | |
run: cp .config_bananapi_m2u .config | |
# Copy configuration | |
- name: Make BananaPi Firmware | |
run: make -j8 | |
- name: Cleanup before release files | |
run: | | |
rm -rf bin/packages/arm_cortex-a7_neon-vfpv4/base | |
rm -rf bin/packages/arm_cortex-a7_neon-vfpv4/freifunk | |
rm -rf bin/packages/arm_cortex-a7_neon-vfpv4/luci | |
rm -rf bin/packages/arm_cortex-a7_neon-vfpv4/packages | |
rm -rf bin/packages/arm_cortex-a7_neon-vfpv4/routing | |
rm -rf bin/packages/arm_cortex-a7_neon-vfpv4/telephony | |
rm -f bin/targets/sunxi/cortexa7/openwrt-toolchain* | |
- name: Compress files | |
run: cd bin && tar czvf ../release.tar.gz * > /dev/null | |
- name: Upload To Github Release | |
# You may pin to the exact commit or the version. | |
# uses: xresloader/upload-to-github-release@92f709ea49b05d55349e9c269754bea46887dc8f | |
uses: xresloader/[email protected] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
# The files or file patterns to upload. You can upload multiple files by split them by semicolon. You can use the glob pattern to find the files. | |
file: "release.tar.gz" | |
# If you need to overwrite existing files, add overwrite: true to the with. | |
overwrite: true | |
# The resultant deployment is a draft Release that only repository collaborators can see. This gives you an opportunity to examine and edit the draft release. | |
draft: true | |
# The resultant deployment is a Prerelease. This gives you an opportunity to examine and edit the prerelease. | |
prerelease: false | |
# With tags: true, your Releases deployment will trigger if and only if the build is a tagged build. | |
tags: false | |
# Only work on these branches(splited by semicolon), set to nothing to accept all branches. | |
branches: master | |
# With verbose: true, be verbose. | |
verbose: false | |
# Set custom tag name. | |
tag_name: ThingLink_SUNXI-${{ github.run_number }} | |
# If try to update latest release. | |
update_latest_release: true |