Skip to content

Commit

Permalink
auto build tools
Browse files Browse the repository at this point in the history
  • Loading branch information
pedohorse committed Jan 19, 2024
1 parent 690566e commit 67ae0f9
Show file tree
Hide file tree
Showing 4 changed files with 87 additions and 10 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/auto-release-tools.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: "release additional tools"

on:
push:
paths:
- dcc_plugins*/**
- src/lifeblood_client/**
branches:
- dev
- master

jobs:
build_all_tools:
uses: ./.github/workflows/build-tools.yml

make_tool_release:
needs:
- build_all_tools
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
path: repo
fetch-depth: 0 # to fetch all history, not just a single commit
- run: |
git config --global user.email "actions@github.com"
git config --global user.name "Tools auto tag"
git checkout ${{ github.sha }}
git tag
git branch --all
git log -n5
TAG="$(git describe)-tools"
echo "TAG=$TAG" >> $GITHUB_ENV
echo "new tag is $TAG"
git tag -a $TAG -m 'tools autobuild update'
git push origin $TAG
working-directory: ./repo
- uses: actions/download-artifact@v4
with:
path:
tools
- run: |
ls -alR tools
echo tag would be $TAG
- uses: softprops/action-gh-release@v1
with:
tag_name: ${{ env.TAG }}
files:
tools/*/*
18 changes: 9 additions & 9 deletions .github/workflows/build-tools.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: "build additional tools"

on:
push:
branches:
- dev
pull_request:
branches:
- dev
workflow_call:
inputs:
artifact_prefix:
required: false
type: string
default: ""

jobs:
build_houdini_tools:
Expand All @@ -25,7 +25,7 @@ jobs:
ls -alhR dcc_plugins
- uses: actions/upload-artifact@v4
with:
name: houdini
name: ${{ inputs.artifact_prefix }}houdini
path:
dcc_plugins/houdini.zip

Expand All @@ -39,6 +39,6 @@ jobs:
dcc_plugins_workspace/build_blender.sh
- uses: actions/upload-artifact@v4
with:
name: blender
name: ${{ inputs.artifact_prefix }}blender
path:
dcc_plugins/lifeblood_addon.zip
dcc_plugins/blender_lifeblood_addon.zip
25 changes: 25 additions & 0 deletions .github/workflows/pypi-pub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,31 @@ jobs:
path: |
pkg_${{ matrix.build_thing }}/dist/*
build_all_tools:
uses: ./.github/workflows/build-tools.yml

make_release:
runs-on: "ubuntu-latest"
needs:
- build
- build_all_tools
steps:
- uses: actions/download-artifact@v4
with:
path:
tools
- run: |
VER=${{ github.ref_name }}
VER=${VER:1}
echo "PYPIVER=$VER" >> $GITHUB_ENV
- uses: softprops/action-gh-release@v1
with:
files:
tools/*/*
append_body: true
body: |
corresponds to release https://pypi.org/project/lifeblood/${{ env.PYPIVER }}/
publish:
runs-on: "ubuntu-latest"
needs: [ "build" ]
Expand Down
2 changes: 1 addition & 1 deletion dcc_plugins_workspace/build_blender.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ rsync -arhv --exclude=__pycache__ --exclude="*.pyc" blender/blender_path $OUT
rsync -arhv --exclude=__pycache__ --exclude="*.pyc" ../src/lifeblood_client $OUT/blender_path/addons/scripts
rsync -arhv --exclude=__pycache__ --exclude="*.pyc" ../src/lifeblood_client $OUT/blender_path/addons/lifeblood_plugin
pushd ../dcc_plugins/blender/blender_path/addons
zip -r ../../../lifeblood_addon.zip lifeblood_plugin --exclude "*__pycache__/" --exclude "*.pyc"
zip -r ../../../blender_lifeblood_addon.zip lifeblood_plugin --exclude "*__pycache__/" --exclude "*.pyc"
popd

popd

0 comments on commit 67ae0f9

Please sign in to comment.