Skip to content

Commit 6a50949

Browse files
committed
Create build_asset_release.yml
1 parent 9456e11 commit 6a50949

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Build Asset for Release
2+
on:
3+
release:
4+
types: [published]
5+
6+
jobs:
7+
build:
8+
9+
name: Build
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@master
15+
16+
- name: Setup Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.11'
20+
21+
- name: Update zip
22+
run: |
23+
cd pcm
24+
python build.py
25+
cd build
26+
echo "ZIP_NAME_WITH=$(ls SparkFun-KiCad-Libraries*-with-pcm.zip)" >> $GITHUB_ENV
27+
echo "PCM_NAME_WITH=$(ls SparkFun-KiCad-Libraries*-with-pcm.zip | rev | cut -c 5- | rev)" >> $GITHUB_ENV
28+
echo "ZIP_NAME_WITHOUT=$(ls SparkFun-KiCad-Libraries*-without-pcm.zip)" >> $GITHUB_ENV
29+
echo "PCM_NAME_WITHOUT=$(ls SparkFun-KiCad-Libraries*-without-pcm.zip | rev | cut -c 5- | rev)" >> $GITHUB_ENV
30+
31+
- name: Publish release
32+
uses: softprops/action-gh-release@v2
33+
with:
34+
files: |
35+
./pcm/build/${{ env.ZIP_NAME_WITH }}
36+
./pcm/build/${{ env.ZIP_NAME_WITHOUT }}

0 commit comments

Comments
 (0)