~aleteoryx/muditaos

ref: 8d9719e8b9d3aa0f99af6f7405e63154e46a8d16 muditaos/.github/workflows/releases.yaml -rw-r--r-- 1.9 KiB
8d9719e8 — Szymon Mroczek [EGD-3510] audio codec configuration for headset microphone (#1004) 5 years ago
                                                                                
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
name: Build Release
on:
  push:
    tags:
    - 'release-*'

jobs:
  build:
    runs-on: self-hosted
    steps:
    - name: "Check Out"
      uses: actions/checkout@v2
      with:
        token: ${{ secrets.GitHub_PAT }}
        submodules: recursive
        fetch-depth: 0
    - name: "Style checking"
      run: |
        ./config/pre-commit.hook --last
    - name: "Unit Tests"
      run: |
        ./configure.sh linux Debug && \
        pushd build-linux-Debug && \
        export JOBS=${JOBS:-`nproc`} && \
        echo "JOBS=${JOBS}" && \
        make -j ${JOBS} check && \
        popd
    - name: "Build and package for RT1051"
      id: build_release_package 
      run: |
        ./configure.sh rt1051 RelWithDebInfo && \
        pushd build-rt1051-RelWithDebInfo && \
        export JOBS=${JOBS:-`nproc`} && \
        echo "JOBS=${JOBS}" && \
        make -j ${JOBS} && \
        make -j ${JOBS}  package && \
        popd && \
        ./print_last_changes.sh && \
        uptime
    - name: Create Release
      id: create_release
      uses: actions/create-release@v1
      env:
        GITHUB_TOKEN: ${{ secrets.GitHub_PAT }}
      with:
        tag_name: ${{ github.ref }}
        release_name: ${{ github.ref }}
        draft: true
        prerelease: true
        body: ${{steps.build_release_package.outputs.release_notes }}
    - name: Upload Release Package
      id: upload-release-package
      uses: actions/upload-release-asset@v1.0.2
      env:
        GITHUB_TOKEN: ${{ secrets.GitHub_PAT }}
      with:
        upload_url: ${{ steps.create_release.outputs.upload_url }}
        # here we have to use relative path with starting "./"
        asset_path: ./${{ steps.build_release_package.outputs.package_path }}/${{steps.build_release_package.outputs.package}}
        asset_name: ${{ steps.build_release_package.outputs.package }}
        asset_content_type: ${{ steps.build_release_package.outputs.mime_type }}