-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
clamp: improve and setup build queue
- Loading branch information
1 parent
80db506
commit 1395cab
Showing
4 changed files
with
133 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: mechanics_clamp_build | ||
|
||
on: | ||
workflow_dispatch: | ||
workflow_call: | ||
push: | ||
# only trigger on branches, not on tags | ||
branches: '**' | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: install openscad | ||
run: sudo apt-get install -y openscad | ||
|
||
- name: set environment variable | ||
run: echo MY_VERSION_ID=$(echo $GITHUB_REF_NAME | grep -oE "v[0-9]+\.[0-9]+\.[0-9]+") >> $GITHUB_ENV | ||
|
||
- name: checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: build | ||
run: | | ||
cd ./mechanics/clamp | ||
echo version: $MY_VERSION_ID | ||
openscad --hardwarnings -D "ver=\"$MY_VERSION_ID\"" -o clamp.stl clamp.scad | ||
openscad --hardwarnings -o distance.stl distance.scad | ||
- name: upload results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: clamp | ||
path: | | ||
./mechanics/clamp/clamp.stl | ||
./mechanics/clamp/distance.stl | ||
./mechanics/clamp/3d_print_instructions |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: mechanics_clamp_createRelease | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
tags: 'mechanics_clamp_v*.*.*' | ||
|
||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/mechanics_clamp_build.yml | ||
|
||
create_release: | ||
runs-on: ubuntu-22.04 | ||
needs: build | ||
steps: | ||
- name: create release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref_name }} # tag_name is the same tag name the triggered this workflow | ||
release_name: ${{ github.ref_name }} | ||
draft: false | ||
prerelease: false | ||
|
||
- name: download build data | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: clamp | ||
path: ./clamp_data | ||
|
||
- name: zip fabrication data | ||
run: zip -jr clamp ./clamp_data | ||
|
||
- name: upload release asset | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ steps.create_release.outputs.upload_url }} # references to the step with id 'create_release' | ||
asset_path: ./clamp.zip | ||
asset_name: ${{ github.event.repository.name }}__${{ github.ref_name }}__clamp.zip | ||
asset_content_type: application/zip |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
suggestions: | ||
- PETG for outdoor use | ||
- variable layer height for high quality | ||
- infill 100% for better stability |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters