-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (57 loc) · 1.9 KB
/
kibot-ci.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
name: CI
env:
BOARD_NAME: "hw-openmower-utils"
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: "hw-openmower-utils-satabob/.kibot.yaml"
board: "hw-openmower-utils-satabob.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: "hw-openmower-utils-satabob/.kibot.yaml"
board: "hw-openmower-utils-satabob.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 }}-hw-openmower-utils-satabob" # 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"