put in a build on push action thingie #1
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
# Workflow to automatically create deliverables | |
name: Build on push | |
on: | |
[push] | |
jobs: | |
build: | |
name: Assembling artifacts | |
runs-on: ubuntu-latest | |
# Note, to satisfy the asset library we need to make sure our zip files have a root folder | |
# this is why we checkout into demo/godot_hand_pose_detector | |
# and build plugin/godot_hand_pose_detector | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
path: demo/godot-mqtt | |
- name: Create Godot Hand Pose Detector | |
run: | | |
mkdir plugin | |
mkdir plugin/godot-mqtt | |
mkdir plugin/godot-mqtt/addons | |
cp -r demo/godot-mqtt/addons/mqtt plugin/godot-mqtt/addons | |
cp demo/godot-mqtt/LICENSE plugin/godot-mqtt/addons/mqtt | |
rm -rf demo/godot-mqtt/.git | |
rm -rf demo/godot-mqtt/.github | |
- name: Create Godot MQTT artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: godot-mqtt | |
path: plugin | |
- name: Create Godot Hand Pose Detector demo artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: godot-mqtt_demo | |
path: demo | |
- name: Zip asset | |
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | |
run: | | |
cd plugin | |
zip -qq -r ../godot-mqtt.zip godot-mqtt | |
cd ../demo | |
zip -qq -r ../godot-mqtt.zip godot-mqtt | |
cd .. | |