diff --git a/.github/workflows/build-on-push.yml b/.github/workflows/build-on-push.yml new file mode 100644 index 0000000..0d6d077 --- /dev/null +++ b/.github/workflows/build-on-push.yml @@ -0,0 +1,54 @@ +# 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 .. +