ci: add simple test pipeline #5

Merged
t.behrendt merged 6 commits from ci-add-cicd into main 2025-12-27 12:40:15 +01:00
Showing only changes of commit 2ccac1decb - Show all commits

View File

@@ -3,7 +3,11 @@ name: CD
on: on:
push: push:
branches: branches:
- ci-add-cicd - main
paths:
- "src/**"
- "CMakeLists.txt"
- "schemas/**"
workflow_dispatch: workflow_dispatch:
jobs: jobs:
@@ -27,21 +31,18 @@ jobs:
- run: | - run: |
sudo apt-get update sudo apt-get update
sudo apt-get install -y build-essential cmake zip sudo apt-get install -y build-essential cmake zip
- name: Configure and build - name: Build
run: | run: |
mkdir -p build mkdir -p build
cd build cd build
cmake .. cmake ..
cmake --build . cmake --build .
- name: Verify binary - run: |
run: |
test -f build/usbmakroboard && echo "Binary built successfully" || exit 1 test -f build/usbmakroboard && echo "Binary built successfully" || exit 1
- name: Create zip archive - run: |
run: |
cd build cd build
zip usbmakroboard-linux-${{ matrix.arch }}.zip usbmakroboard zip usbmakroboard-linux-${{ matrix.arch }}.zip usbmakroboard
- name: Generate checksum - run: |
run: |
cd build cd build
sha256sum usbmakroboard-linux-${{ matrix.arch }}.zip > usbmakroboard-linux-${{ matrix.arch }}.zip.sha256 sha256sum usbmakroboard-linux-${{ matrix.arch }}.zip > usbmakroboard-linux-${{ matrix.arch }}.zip.sha256
- name: Upload artifacts - name: Upload artifacts
@@ -68,12 +69,9 @@ jobs:
- uses: https://gitea.t000-n.de/t.behrendt/actions/release-git-tag@0.1.0 - uses: https://gitea.t000-n.de/t.behrendt/actions/release-git-tag@0.1.0
with: with:
tag: ${{ steps.tag.outputs.new-tag }} tag: ${{ steps.tag.outputs.new-tag }}
- uses: ChristopherHX/gitea-download-artifact@v4
- name: Download artifacts
uses: ChristopherHX/gitea-download-artifact@v4
with: with:
path: artifacts path: artifacts
- name: Create release - name: Create release
uses: akkuman/gitea-release-action@v1 uses: akkuman/gitea-release-action@v1
with: with: