name: Build and Release (Linux) on: push: tags: - 'v*' permissions: contents: write jobs: build-linux: name: Build on Ubuntu runs-on: ubuntu-latest steps: - name: Checkout repository uses: actions/checkout@v4 - name: Install Flatpak & flatpak-builder run: | sudo apt-get update sudo apt-get install -y flatpak flatpak-builder flatpak remote-add --user --if-not-exists flathub https://flathub.org/repo/flathub.flatpakrepo - name: Create Flatpak Manifest run: | # This JSON file tells flatpak-builder exactly how to compile the plugin # against the OBS Studio runtime. cat < plugin.json { "id": "com.obsproject.Studio.Plugin.CDRecStatus", "branch": "stable", "runtime": "com.obsproject.Studio", "runtime-version": "stable", "sdk": "org.freedesktop.Sdk//25.08", "build-extension": true, "build-options": { "prefix": "/app/plugins/cd-rec-status" }, "modules": [ { "name": "cd-rec-status", "buildsystem": "cmake-ninja", "config-opts": [ "-DENABLE_FRONTEND_API=ON", "-DENABLE_QT=ON" ], "sources": [ { "type": "dir", "path": "." } ] } ] } EOF - name: Build Plugin in Flatpak Sandbox run: flatpak-builder --user --install-deps-from=flathub --force-clean build-dir plugin.json - name: Package Artifacts run: | mkdir -p release_package/cd-rec-status/bin/64bit mkdir -p release_package/cd-rec-status/data find .flatpak-builder/build/ -name "cd-rec-status.so" -exec cp {} release_package/cd-rec-status/bin/64bit/ \; cp -r data/* release_package/cd-rec-status/data/ cd release_package tar -czvf ../cd-rec-status-linux-x86_64.tar.gz . - name: Upload Build Artifact uses: actions/upload-artifact@v4 with: name: cd-rec-status-linux-x86_64 path: cd-rec-status-linux-x86_64.tar.gz release: name: Create GitHub Release needs: build-linux runs-on: ubuntu-latest steps: - name: Download artifacts uses: actions/download-artifact@v4 with: path: artifacts merge-multiple: true - name: Publish Release uses: softprops/action-gh-release@v2 with: files: artifacts/*.tar.gz generate_release_notes: true