name: Build release on: push: tags: - 'v*-stable' jobs: build-project: name: Build Project runs-on: ubuntu-22.04 container: localhost:5000/git-workflow-universal steps: - name: Install tools run: apt update && apt install -y cmake gcc-arm-none-eabi - name: Checkout Project uses: actions/checkout@v2 with: fetch-depth: 0 - name: Get Commit Message id: commit_message run: | TAG="${{ github.ref_name }}" COMMIT_SHA=$(git rev-parse "$TAG^{commit}") if [ -z "$COMMIT_SHA" ]; then COMMIT_SHA=$(git rev-parse "$TAG") fi MESSAGE=$(git log -1 --pretty=format:%s $COMMIT_SHA) echo "::set-output name=message::$MESSAGE" - name: Configure cmake DEBUG project run: cmake -DCMAKE_BUILD_TYPE=Debug -B cmake-build-debug - name: Build DEBUG run: cmake --build cmake-build-debug -j 6 - name: Create Release and Upload Asset id: create_release uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Это автоматически предоставляется Gitea Actions with: tag_name: ${{ github.ref_name }} name: Release ${{ github.ref_name }} body: | Релиз создан автоматически из коммита: ${{ steps.commit_message.outputs.message }} files: | ${{github.workspace}}/cmake-build-debug/f411-pulse-recorder.bin ${{github.workspace}}/cmake-build-debug/f411-pulse-recorder.elf ${{github.workspace}}/cmake-build-debug/f411-pulse-recorder.hex