From fadcc089c67f153f6a5a2d471308f53f1d3783c6 Mon Sep 17 00:00:00 2001 From: Charles Moore Date: Thu, 19 Sep 2024 18:33:04 +0000 Subject: [PATCH] ci: package and publish Keyshot plugin to the GitHub release Signed-off-by: Charles Moore --- .github/actions/bump_precommit_hook/action.yml | 16 ++++++++++++++++ .../actions/prepush_release_hook/action.yml | 18 ++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 .github/actions/bump_precommit_hook/action.yml create mode 100644 .github/actions/prepush_release_hook/action.yml diff --git a/.github/actions/bump_precommit_hook/action.yml b/.github/actions/bump_precommit_hook/action.yml new file mode 100644 index 0000000..f38ea43 --- /dev/null +++ b/.github/actions/bump_precommit_hook/action.yml @@ -0,0 +1,16 @@ +inputs: + semver: + required: true + type: string + +runs: + using: composite + steps: + - name: Update plugin Version + shell: bash + run: | + sed -i "s/^# VERSION.*/# VERSION ${{inputs.semver}}/" ./src/deadline/keyshot_submitter/Submit\ to\ AWS\ Deadline\ Cloud.py + major=$(printf ${{inputs.semver}} | cut -d '.' -f1) + minor=$(printf ${{inputs.semver}} | cut -d '.' -f2) + sed -i "s/keyshot-openjd=[0-9]*.[0-9]*.\\*/keyshot-openjd=$major.$minor.\\*/" ./src/deadline/keyshot_submitter/Submit\ to\ AWS\ Deadline\ Cloud.py + git add ./src/deadline/keyshot_submitter/Submit\ to\ AWS\ Deadline\ Cloud.py \ No newline at end of file diff --git a/.github/actions/prepush_release_hook/action.yml b/.github/actions/prepush_release_hook/action.yml new file mode 100644 index 0000000..42f5529 --- /dev/null +++ b/.github/actions/prepush_release_hook/action.yml @@ -0,0 +1,18 @@ +inputs: + semver: + required: true + type: string + tag: + required: true + type: string + +runs: + using: composite + steps: + - name: Zip submitter plugin + shell: bash + run: | + mkdir dist_extras + cd src/deadline/keyshot_submitter + zip -r ../../../dist_extras/keyshot_submitter_plugin_${{inputs.semver}}.zip . + cd ../../../