34 lines
883 B
YAML
34 lines
883 B
YAML
name: "PCB production files"
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v[0-9]+.[0-9]+.[0-9]+'
|
|
branches:
|
|
- main
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
- uses: cachix/install-nix-action@v31
|
|
with:
|
|
nix_path: nixpkgs=channel:nixos-unstable
|
|
- name: Set version to GITHUB_SHA
|
|
if: ${{ github.ref_type != 'tag' }}
|
|
run: echo "version=${{ github.sha }}" >> $GITHUB_ENV
|
|
- name: Set version to GITHUB_REF_NAME
|
|
if: ${{ github.ref_type == 'tag' }}
|
|
run: echo "version=${{ github.ref_name }}" >> $GITHUB_ENV
|
|
- name: Build
|
|
run: |
|
|
nix profile install nixpkgs#kicad-small
|
|
cd pcb
|
|
go run .
|
|
- uses: actions/upload-artifact@v4
|
|
with:
|
|
name: shii-pcb-${{ env.version }}
|
|
path: pcb/production/
|