v0.1.2 #18
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: cp0 package | |
| on: | |
| push: {} | |
| pull_request: {} | |
| workflow_dispatch: {} | |
| release: | |
| types: | |
| - published | |
| permissions: | |
| contents: read | |
| jobs: | |
| build: | |
| name: Build cp0 binary and Debian package | |
| runs-on: ubuntu-24.04 | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Install system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| cmake \ | |
| dpkg-dev \ | |
| g++-aarch64-linux-gnu \ | |
| gcc-aarch64-linux-gnu \ | |
| git \ | |
| python3-venv | |
| - name: Bootstrap third-party dependencies | |
| run: ./bootstrap.sh | |
| - name: Build cp0 package | |
| run: ./packaging/deb/package_deb.sh | |
| - name: Collect release assets | |
| run: | | |
| mkdir -p release-assets | |
| cp dist/M5CardputerZero-Compass release-assets/ | |
| cp dist/*.deb release-assets/ | |
| ls -lh release-assets | |
| - name: Upload workflow artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: cp0-package | |
| path: release-assets/* | |
| if-no-files-found: error | |
| upload-release-assets: | |
| name: Upload assets to GitHub Release | |
| if: github.event_name == 'release' | |
| runs-on: ubuntu-24.04 | |
| needs: build | |
| permissions: | |
| contents: write | |
| steps: | |
| - name: Download workflow artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: cp0-package | |
| path: release-assets | |
| - name: Upload assets to GitHub Release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| GH_REPO: ${{ github.repository }} | |
| RELEASE_TAG: ${{ github.event.release.tag_name }} | |
| run: gh release upload "$RELEASE_TAG" release-assets/* --clobber |