Skip to content

Merge pull request #24 from berkus/zip-pipeline-artifacts #4

Merge pull request #24 from berkus/zip-pipeline-artifacts

Merge pull request #24 from berkus/zip-pipeline-artifacts #4

Workflow file for this run

name: Upload Pre-Release Asset
permissions:
contents: write
on:
push:
branches:
- master
jobs:
build:
name: Upload Pre-Release Asset
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
- name: Set tag hash
id: tag
run: echo "hash=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT
- name: gitmarker
run: "for i in *.kicad_pcb; do sed -i 's/{GITHASH}/${{ steps.tag.outputs.hash }}/g' $i; done" # add git marker
- uses: INTI-CMNB/KiBot@v2_k8
with:
# Required - kibot config file
config: config.kibot.yaml
# optional - prefix to output defined in config
dir: output
- name: Prepare release
run: |
mkdir -p zipped/
zip -n zip -9 -o -D zipped/rusty-probe-pcb.zip output/*.csv output/*.html output/*.png output/*.pdf output/*.zip
- name: Release with Notes
uses: softprops/action-gh-release@v2
with:
body: Publish new snapshot of PCB @ ${{ github.sha }}
tag_name: preview-${{ steps.tag.outputs.hash }}
prerelease: true
fail_on_unmatched_files: true
files: |
zipped/rusty-probe-pcb.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}