First Version worth testing #17
Workflow file for this run
This file contains 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: CI | |
env: | |
BOARD_NAME: "hw-openmower-universal" | |
on: | |
push: | |
paths-ignore: | |
- "**.md" | |
pull_request: | |
branches: | |
- 'main' | |
workflow_dispatch: | |
# Allow to stop obsolete workflows | |
concurrency: | |
group: ci-buildtrain-${{ github.ref }}-1 | |
cancel-in-progress: true | |
jobs: | |
kibot: | |
runs-on: ubuntu-latest | |
if: github.ref_type != 'tag' | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: INTI-CMNB/KiBot@v2_k8 | |
with: | |
config: ".kibot.yaml" | |
board: "${{ env.BOARD_NAME }}.kicad_pcb" | |
verbose: 1 | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: "${{ env.BOARD_NAME }}-${{ github.ref_name }}" # Use the tag as the artifact name | |
path: release | |
tagged-release: | |
runs-on: ubuntu-latest | |
if: github.ref_type == 'tag' && startsWith(github.ref_name, 'v') | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- uses: INTI-CMNB/KiBot@v2_k8 | |
with: | |
config: ".kibot.yaml" | |
board: "${{ env.BOARD_NAME }}.kicad_pcb" | |
- name: 'Fix permissions on release/' | |
run: sudo chmod 0777 release | |
# Zip the release directory and include the tag (version) in the filename | |
- name: Compress release directory into a versioned ZIP file | |
run: zip -r "release-${{ env.BOARD_NAME }}-${GITHUB_REF_NAME}.zip" release/* | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: "release-${{ env.BOARD_NAME }}-${{ github.ref_name }}" # Use the tag as the artifact name | |
path: release | |
- uses: "marvinpinto/action-automatic-releases@latest" | |
with: | |
repo_token: "${{ secrets.GITHUB_TOKEN }}" | |
prerelease: false | |
files: "release-${{ env.BOARD_NAME }}-${{ github.ref_name }}.zip" | |
- name: Deploy release | |
uses: peaceiris/actions-gh-pages@v4 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: release | |
destination_dir: release | |