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