Skip to content

Fix revision tag

Fix revision tag #11

name: Hardware
permissions:
contents: write
actions: read
checks: write
on:
push:
branches:
- "main"
tags:
- "*"
pull_request:
paths:
- "Hardware/**"
- ".github/workflows/**"
#
jobs:
KiCad_Hardware:
runs-on: ubuntu-latest
name: KiCad Hardware
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
submodules: true
- uses: INTI-CMNB/KiBot@v2_k8
with:
# Config file
config: Hardware/config.kibot.yaml
# Prefix for output in config file.
dir: _hardwareOutput
# Hardware Files
#
schema: "Hardware/RoomBouy/RoomBouy.kicad_sch"
board: "Hardware/RoomBouy/RoomBouy.kicad_pcb"
#
- name: upload results
uses: actions/upload-artifact@v2
with:
name: Board-Hardware
path: _hardwareOutput
dev-publish:
# publish only to devs
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
name: Dev-Publish
needs: [KiCad_Hardware]
steps:
- uses: actions/download-artifact@v2
with:
name: Board-Hardware
- name: Upload KiCAD Artifacts
uses: edunad/[email protected]
with:
path: "*-3D_top.png"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
title: "PCB"
publish:
# Only run on tags
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
name: Publish
needs: [KiCad_Hardware]
steps:
# Be in our repo
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/download-artifact@v2
with:
name: Board-Hardware
- run: mkdir -p _staging/
- run: cp *.step _staging/
# Copy gerbers
- run: cp PCBWay/*.zip _staging/Board-$(git rev-parse --short HEAD)-PCBWay.zip
- run: cp JLCPCB/*.zip _staging/Board-$(git rev-parse --short HEAD)-JLCPCB.zip
- name: Upload artifacts to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: "_staging/*"
tag: ${{ github.ref }}
overwrite: true
prerelease: true
#
body: "Concord Robotics, Automated with github ci/cd."
file_glob: true