Skip to content

Attempt to get github actions creating releases again #12

Attempt to get github actions creating releases again

Attempt to get github actions creating releases again #12

Workflow file for this run

# SPDX-FileCopyrightText: 2022 nerdyscout <https://github.com/nerdyscout/>
#
# SPDX-License-Identifier: CC0-1.0
name: KiBot
on:
workflow_dispatch:
push:
pull_request:
env:
schema: "pipad.kicad_sch"
board: "pipad.kicad_pcb"
dir: .
jobs:
# checks
ERC:
runs-on: ubuntu-latest
container:
image: setsoft/kicad_auto:ki7
steps:
- uses: actions/checkout@v3
- name: run kibot
run: |
kibot -c kibot.yml -e ${{env.schema}} -b ${{env.board}} -d ${{env.dir}} -s run_drc -v -i
DRC:
runs-on: ubuntu-latest
container:
image: setsoft/kicad_auto:ki7
steps:
- uses: actions/checkout@v3
- name: run kibot
run: |
kibot -c kibot.yml -e ${{env.schema}} -b ${{env.board}} -d ${{env.dir}} -s run_erc -v -i
# documentation
docs:
runs-on: ubuntu-latest
# needs: [ERC]
container:
image: setsoft/kicad_auto:ki7
steps:
- uses: actions/checkout@v3
- name: run kibot
run: |
kibot -c kibot.yml -e ${{env.schema}} -b ${{env.board}} -d ${{env.dir}} -s run_erc,run_drc -v \
ibom.html octopart.csv schematic.pdf schematic.svg board_top.pdf board_bottom.pdf
- uses: actions/[email protected]
if: ${{success()}}
with:
name: ${{github.event.repository.name}}_docs
if-no-files-found: error
path: |
${{env.dir}}/docs/**
!${{env.dir}}/**/*.ogv
!${{env.dir}}/**/*.log
# fabrications
gerbers:
runs-on: ubuntu-latest
# needs: [DRC]
container:
image: setsoft/kicad_auto:ki7
steps:
- uses: actions/checkout@v3
- name: run kibot
run: |
kibot -c kibot.yml -e ${{env.schema}} -b ${{env.board}} -d ${{env.dir}} -s run_erc,run_drc -v \
gerbers.gbr drills.gbr drills.drl pickandplace.csv bom.csv
- uses: actions/[email protected]
if: ${{success()}}
with:
name: ${{github.event.repository.name}}_gerbers
if-no-files-found: error
path: |
${{env.dir}}/gerbers/**
!${{env.dir}}/**/*.ogv
!${{env.dir}}/**/*.log
# cad
cad:
runs-on: ubuntu-latest
# needs: [DRC]
container:
image: setsoft/kicad_auto:ki7
steps:
- uses: actions/checkout@v3
- name: run kibot
run: |
kibot -c kibot.yml -e ${{env.schema}} -b ${{env.board}} -d ${{env.dir}} -s run_erc,run_drc -v \
model.step openboardview.brd autocad.dxf
- uses: actions/[email protected]
if: ${{success()}}
with:
name: ${{github.event.repository.name}}_cad
if-no-files-found: error
path: |
${{env.dir}}/cad/**
!${{env.dir}}/**/*.ogv
!${{env.dir}}/**/*.log
# images
render:
runs-on: ubuntu-latest
# needs: [DRC]
container:
image: setsoft/kicad_auto:ki7
steps:
- uses: actions/checkout@v3
- name: run kibot
run: |
kibot -c kibot.yml -e ${{env.schema}} -b ${{env.board}} -d ${{env.dir}} -s run_erc,run_drc -v \
board_black_top.svg board_black_bottom.svg
- uses: actions/[email protected]
if: ${{success()}}
with:
name: ${{github.event.repository.name}}_img
if-no-files-found: error
path: |
${{env.dir}}/img/**
!${{env.dir}}/**/*.ogv
!${{env.dir}}/**/*.log
release:
needs: [render, gerbers, cad, docs, DRC, ERC]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: download all artifacts
uses: actions/[email protected]
- name: find .
run: find .
- name: tarballs
run: for dir in pipad_{docs,cad,gerbers,img}; do tar czf "${dir}.tgz" "${dir}"; done
- name: create release
uses: softprops/action-gh-release@v1
with:
name: Release ${{ github.run_id }} (${{ github.sha }})
tag_name: v${{ github.run_id }}
target_commitish: ${{ github.ref }}
files: |
pipad_cad.tgz
pipad_docs.tgz
pipad_gerbers.tgz
pipad_img.tgz
fail_on_unmatched_files: true