Skip to content

update to 2024-03

update to 2024-03 #44

Workflow file for this run

name: Build Models
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Install OpenSCAD
run: sudo apt-get install -y openscad
- uses: actions/checkout@v4
- name: Cache STL Files
id: cache-stl
uses: actions/cache@v4
with:
path: cache
key: stlcache-${{ runner.os }}-${{ github.run_id }}
restore-keys: |
stlcache-${{ runner.os }}
- name: read cache
run: .github/workflows/getcache
- name: build
run: make -j $(nproc)
- name: create cache
run: .github/workflows/mkcache
- name: Publish STL files
uses: actions/upload-artifact@v4
with:
name: stl-files
path: stl
- name: Extract Tag Name
if: startsWith(github.ref, 'refs/tags/v')
id: tagname
run: echo "tagname=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
shell: bash
- name: Zip STL files
if: startsWith(github.ref, 'refs/tags/v')
run: |
mv stl stl-LDraw-${{ steps.tagname.outputs.tagname }}
zip -r stl-LDraw-${{ steps.tagname.outputs.tagname }}.zip stl-LDraw-${{ steps.tagname.outputs.tagname }}
- name: release
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: |
stl-LDraw-${{ steps.tagname.outputs.tagname }}.zip
token: ${{ secrets.MY_SECRET }}