From 1f6ecbb19ee75a67c8133ac981ca8ea96fe8df80 Mon Sep 17 00:00:00 2001 From: Jakub Kakona Date: Sat, 1 Feb 2025 22:15:04 +0100 Subject: [PATCH] Update workflows. --- .gitattributes | 2 ++ .github/workflows/kicad_outputs.yml | 38 ++++++++++++++-------------- .github/workflows/release_assets.yml | 36 ++++++++++++++++++++++++++ .gitignore | 31 +++++++++++------------ 4 files changed, 72 insertions(+), 35 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/release_assets.yml diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..0b3d9eb --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +hw/cam_profi/* merge=theirs +doc/gen/* merge=theirs diff --git a/.github/workflows/kicad_outputs.yml b/.github/workflows/kicad_outputs.yml index a927fa0..561d4c3 100644 --- a/.github/workflows/kicad_outputs.yml +++ b/.github/workflows/kicad_outputs.yml @@ -33,7 +33,7 @@ jobs: token: ${{ secrets.pat }} ref: ${{ github.head_ref }} - - uses: INTI-CMNB/KiBot@v2_dk7 + - uses: INTI-CMNB/KiBot@v2_dk8 with: config: ${{ env.kibot }}/erc.kibot.yaml schema: ${{ env.schema }} @@ -51,7 +51,7 @@ jobs: token: ${{ secrets.pat }} ref: ${{ github.head_ref }} - - uses: INTI-CMNB/KiBot@v2_dk7 + - uses: INTI-CMNB/KiBot@v2_dk8 with: config: ${{ env.kibot }}/drc.kibot.yaml schema: ${{ env.schema }} @@ -69,14 +69,14 @@ jobs: token: ${{ secrets.pat }} ref: ${{ github.head_ref }} - - uses: INTI-CMNB/KiBot@v2_dk7 + - uses: INTI-CMNB/KiBot@v2_dk8 with: config: ${{ env.kibot }}/schematics.kibot.yaml schema: ${{ env.schema }} board: ${{ env.board }} dir: ${{ env.dir }}_docs - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ success() }} with: name: doc_sch @@ -93,14 +93,14 @@ jobs: token: ${{ secrets.pat }} ref: ${{ github.head_ref }} - - uses: INTI-CMNB/KiBot@v2_dk7 + - uses: INTI-CMNB/KiBot@v2_dk8 with: config: ${{ env.kibot }}/placement.kibot.yaml schema: ${{ env.schema }} board: ${{ env.board }} dir: ${{ env.dir }}_docs - - uses: INTI-CMNB/KiBot@v2_dk7 + - uses: INTI-CMNB/KiBot@v2_dk8 with: config: ${{ env.kibot }}/xml.kibot.yaml schema: ${{ env.schema }} @@ -119,7 +119,7 @@ jobs: mv hw/sch_pcb/*.xml doc_xml/ || true; mv hw/out_docs/*.csv doc_xml/ || true; - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ success() }} with: name: doc_xml @@ -127,7 +127,7 @@ jobs: doc_xml # Zde se zahazuji debugovaci videa - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ success() }} with: name: doc_placement @@ -146,14 +146,14 @@ jobs: token: ${{ secrets.pat }} ref: ${{ github.head_ref }} - - uses: INTI-CMNB/KiBot@v2_dk7 + - uses: INTI-CMNB/KiBot@v2_dk8 with: config: ${{ env.kibot }}/report.kibot.yaml schema: ${{ env.schema }} board: ${{ env.board }} dir: ${{ env.dir }}_report - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ success() }} with: name: doc_report @@ -170,7 +170,7 @@ jobs: token: ${{ secrets.pat }} ref: ${{ github.head_ref }} - - uses: INTI-CMNB/KiBot@v2_dk7 + - uses: INTI-CMNB/KiBot@v2_dk8 with: config: ${{ env.kibot }}/ibom.kibot.yaml schema: ${{ env.schema }} @@ -180,7 +180,7 @@ jobs: - name: "Rename output" run: for file in $(find ${{env.dir}} -type f); do sudo mv "${file}" "${file//${{env.project}}/${{env.branch}}}" ; done - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ success() }} with: name: doc_ibom @@ -199,7 +199,7 @@ jobs: token: ${{ secrets.pat }} ref: ${{ github.head_ref }} - - uses: INTI-CMNB/KiBot@v2_dk7 + - uses: INTI-CMNB/KiBot@v2_dk8 with: config: ${{ env.kibot }}/gerbers.kibot.yaml schema: ${{ env.schema }} @@ -210,7 +210,7 @@ jobs: - name: "Rename output" run: for file in $(find ${{env.dir}}_gerbers -type f); do sudo mv "${file}" "${file//${{env.project}}/${{env.branch}}}" || true ; done - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 if: ${{ success() }} with: name: hw_cam_profi @@ -228,14 +228,14 @@ jobs: token: ${{ secrets.pat }} ref: ${{ github.head_ref }} - - uses: INTI-CMNB/KiBot@v2_dk7 + - uses: INTI-CMNB/KiBot@v2_dk8 with: config: ${{ env.kibot }}/cad.kibot.yaml schema: ${{ env.schema }} board: ${{ env.board }} dir: ${{ env.dir }}_cad - - uses: INTI-CMNB/KiBot@v2_dk7 + - uses: INTI-CMNB/KiBot@v2_dk8 with: config: ${{ env.kibot }}/render.kibot.yaml schema: ${{ env.schema }} @@ -243,13 +243,13 @@ jobs: dir: ${{ env.dir }}_img verbose: 3 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ success() }} with: name: doc_cad path: ${{ env.dir }}_cad/** - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ success() }} with: name: doc_img @@ -271,7 +271,7 @@ jobs: git submodule update --remote || true - name: Download a Build Artifact - uses: actions/download-artifact@v3.0.0 + uses: actions/download-artifact@v4 - name: Remove old manufarturing data run: | diff --git a/.github/workflows/release_assets.yml b/.github/workflows/release_assets.yml new file mode 100644 index 0000000..87b24d2 --- /dev/null +++ b/.github/workflows/release_assets.yml @@ -0,0 +1,36 @@ +name: Release Assets + +permissions: write-all + +on: + release: + types: [edited, prereleased, released] + +jobs: + upload-gerber-assets: + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Set up variables + run: | + REPO_NAME=$(basename -s .git `git config --get remote.origin.url`) + COMMIT_SHA=$(git rev-parse --short HEAD) + ZIP_NAME="${REPO_NAME}-${COMMIT_SHA}.gerber.zip" + echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV + + - name: Create ZIP archive of Gerber files + run: | + zip -j ${{ env.ZIP_NAME }} hw/cam_profi/gbr/* + + - name: Upload ZIP as release asset + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ github.event.release.upload_url }} + asset_path: ${{ env.ZIP_NAME }} + asset_name: ${{ env.ZIP_NAME }} + asset_content_type: application/zip diff --git a/.gitignore b/.gitignore index a7ca390..9e4e29f 100644 --- a/.gitignore +++ b/.gitignore @@ -1,23 +1,22 @@ -# For PCBs designed using KiCad: http://www.kicad-pcb.org/ -# Format documentation: http://kicad-pcb.org/help/file-formats/ -# Temporary files +*~ *.000 +_autosave-* +*auto_saved_files# +*backup* +*-backups *.bak *.bck +*.dsn +*fp-info-cache +fp-info-cache *.kicad_pcb-bak -*.sch-bak -*~ -*-backups* -_autosave-* -*.tmp -*-save.pro +*.kicad_prl +*.kicad_sch-bak +*.lck +*.orig *-save.kicad_pcb -fp-info-cache - -# Netlist files (exported from Eeschema) -*.net - -# Autorouter files (exported from Pcbnew) -*.dsn +*-save.pro +*.sch-bak *.ses +*.tmp