Skip to content

Release 1.1

Release 1.1 #58

Workflow file for this run

name: Build
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-22.04
permissions:
contents: write
env:
KICAD_LIBRARY: /home/runner/work/LoRa-GPS-Tracker/LoRa-GPS-Tracker/library
strategy:
matrix:
device_type: [Debug, Full, Minimal]
include:
- device_type: Full
NewImage: 1
steps:
- name: Checkout
uses: actions/checkout@v3
with:
path: .
submodules: recursive
- name: Dependencies
run: |
sudo apt update
wget https://github.com/INTI-CMNB/KiBot/releases/download/v1.6.5/kibot_1.6.5-1_all.deb
sudo apt install ./kibot*_all.deb
wget https://github.com/INTI-CMNB/InteractiveHtmlBom/releases/download/v2.9.0-1/interactivehtmlbom.inti-cmnb_2.9.0-1_all.deb
sudo apt install ./interactivehtmlbom.inti-cmnb_2.9.0-1_all.deb
wget https://github.com/INTI-CMNB/KiAuto/releases/download/v2.3.0/kiauto_2.3.0-1_all.deb
sudo apt install ./kiauto_2.3.0-1_all.deb
sudo add-apt-repository --yes ppa:kicad/kicad-8.0-releases
sudo apt install --install-recommends kicad
git clone https://github.com/Kampi/KiCad.git library
- name: Extract branch name
shell: bash
run: echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
id: extract_branch
- name: Initialize
run: |
mkdir -p docs/images/
mkdir production
- name: Generate files
run: |
cd project
kibot -g variant=${{ matrix.device_type }} -d ../production/${{ matrix.device_type }}
- name: Upload Results
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.device_type }}
path: |
production
if-no-files-found: ignore
- if: ${{ matrix.NewImage }}
name: Update image
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
cp production/${{ matrix.device_type }}/docs/images/PCB_Rendering.png docs/images/Image_Complete.jpg
git add docs/images/Image_Complete.jpg
git commit -m "Add image from CI/CD action"
git remote set-url origin https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
echo https://${{ github.actor }}:${{ secrets.GITHUB_TOKEN }}@github.com/${{ github.repository }}
git push origin ${{ steps.extract_branch.outputs.branch }}