From fa474bc47f3948a47764c2e08219560b63be6053 Mon Sep 17 00:00:00 2001 From: Vladislav Ostapov Date: Sun, 6 Apr 2025 15:02:34 +0300 Subject: [PATCH] =?UTF-8?q?=D0=B4=D0=BE=D0=B1=D0=B0=D0=B2=D0=B8=D0=BB=20?= =?UTF-8?q?=D1=81=D0=B1=D0=BE=D1=80=D0=BA=D1=83=20=D1=80=D0=B5=D0=BB=D0=B8?= =?UTF-8?q?=D0=B7=D0=BD=D0=BE=D0=B9=20=D0=B2=D0=B5=D1=80=D1=81=D0=B8=D0=B8?= =?UTF-8?q?=20=D0=BF=D1=80=D0=BE=D1=88=D0=B8=D0=B2=D0=BA=D0=B8=20=D0=BC?= =?UTF-8?q?=D0=B8=D0=BA=D1=80=D0=BE=D0=BA=D0=BE=D0=BD=D1=82=D1=80=D0=BE?= =?UTF-8?q?=D0=BB=D0=BB=D0=B5=D1=80=D0=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitea/workflows/release.yml | 47 ++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 .gitea/workflows/release.yml diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml new file mode 100644 index 0000000..1729ef8 --- /dev/null +++ b/.gitea/workflows/release.yml @@ -0,0 +1,47 @@ +name: Build release +on: + push: + tags: + - 'v*-stable' +jobs: + build-project: + name: Build Project + runs-on: ubuntu-22.04 + 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 +