/ .github / workflows / compile.yml
compile.yml
 1  # This is a basic workflow to help you get started with Actions
 2  
 3  name: compile test and publish
 4  
 5  # Controls when the action will run. Triggers the workflow on push or pull request
 6  # events but only for the master branch
 7  on:
 8    push:
 9      branches: [ develop ]
10    pull_request:
11      branches: [ master ]
12  # on: [push, pull_request]
13  
14  # A workflow run is made up of one or more jobs that can run sequentially or in parallel
15  jobs:
16    # This workflow contains a single job called "build"
17    compile_publish:
18      name: compile test
19      # The type of runner that the job will run on
20      runs-on: ubuntu-latest
21  
22      # Steps represent a sequence of tasks that will be executed as part of the job
23      steps:
24        # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
25        - name: checkout code from github
26          uses: actions/checkout@v2
27  
28        # Runs a set of commands using the runners shell
29        - name: sync shell cmd
30          run: |
31            git submodule update --init --recursive
32            wget https://github.com/kendryte/kendryte-gnu-toolchain/releases/download/v8.2.0-20190409/kendryte-toolchain-ubuntu-amd64-8.2.0-20190409.tar.xz
33            sudo tar -Jxf kendryte-toolchain-ubuntu-amd64-8.2.0-20190409.tar.xz -C /opt
34            rm -f kendryte-toolchain-ubuntu-amd64-8.2.0-20190409.tar.xz
35            cd tools/release
36            chmod +x release.sh && ./release.sh
37