forked from kicad-huaqiu/kicad-amf-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
43 lines (36 loc) · 1.21 KB
/
kicad-pcm-simple.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
# This is a workflow to generate the zip file and metadata.json for KiCAD PCM
# https://gitlab.com/kicad/addons/metadata/-/merge_requests/14
name: KiCAD PCM packaging
on: # yamllint disable-line rule:truthy
release:
branches: [main]
types:
- published
workflow_dispatch:
jobs:
create_archive:
runs-on: ubuntu-latest
steps:
- name: Get latest tag
uses: oprypin/find-latest-tag@v1
with:
repository: Liangtie/kicad-amf-plugin
releases-only: true
id: latest-release
- name: Checkout repo
uses: actions/checkout@v3
- name: Setup env
run: pip3 install -r ./requirements-dev.txt
- name: Unittest
run: pytest
- name: Create archive
run: sh ./PCM/create_pcm_archive.sh ${{ steps.latest-release.outputs.tag }}
- name: Upload zip as asset to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./PCM/KiCAD-PCM-${{ steps.latest-release.outputs.tag }}.zip
asset_name: KiCAD-PCM-${{ steps.latest-release.outputs.tag }}.zip
overwrite: true
tag: ${{ steps.latest-release.outputs.tag }}