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 }}