-
Notifications
You must be signed in to change notification settings - Fork 6
74 lines (70 loc) · 2.6 KB
/
release_bundle.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
name: Bundle Release files
on: push
jobs:
bundle:
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Setup
run: |
sudo apt update
sudo apt install -y wget libgl1 texlive-latex-base texlive-latex-extra latexmk
sudo pip install sphinx==6.1.3 sphinx-rtd-theme==1.2.0
- name: Get freecad from cache
id: cache-freecad
uses: actions/cache@v3
with:
path: ~/bin/freecad
key: freecad-0.21.1
- if: ${{ steps.cache-freecad.outputs.cache-hit != 'true' }}
name: Get freecad from github
run: |
mkdir ~/bin/
wget -O ~/bin/freecad https://github.com/FreeCAD/FreeCAD/releases/download/0.21.1/FreeCAD_0.21.1-Linux-x86_64.AppImage
chmod 755 ~/bin/freecad
- uses: actions/cache/save@v3
if: always()
with:
path: ~/bin/freecad
key: freecad-0.21.1
- name: install freecad modules
run: |
mkdir -p ~/.local/share/FreeCAD/Mod
cd ~/.local/share/FreeCAD/Mod
git clone https://github.com/mwganson/ThreadProfile
git clone https://github.com/shaise/FreeCAD_FastenersWB
- name: export hardware files
run: |
ls
cd case
~/bin/freecad --appimage-extract-and-run -c export_hardware.py
cd build
zip -r ../../hardware.zip *
- name: export firmware files
run: |
cd firmware
zip ../firmware.zip *.py
- name: generate manual
run: |
cd firmware/docs
make latexpdf
cp build/latex/sap6.pdf ../../manual.pdf
- name: 'Upload Artifacts'
uses: actions/upload-artifact@v3
with:
name: artifacts
path: |
hardware.zip
firmware.zip
manual.pdf
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
draft: true
generate_release_notes: true
files: |
hardware.zip
firmware.zip
manual.pdf