Merge feature/plugin-metadata: Add Plugin Manager support #7
Workflow file for this run
This file contains hidden or 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
| name: build | |
| on: | |
| push: | |
| branches: ["**"] | |
| tags: ["v*", "V*"] | |
| pull_request: | |
| branches: ["**"] | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build-linux: | |
| name: Build for Linux | |
| runs-on: ubuntu-latest | |
| env: | |
| IDASDK: ${{ github.workspace }}/ida-sdk/src | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v4 | |
| - name: Prepare IDA SDK and helpers | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| git clone --depth 1 https://github.com/HexRaysSA/ida-sdk ida-sdk | |
| mkdir -p "${IDASDK}" | |
| git clone --depth 1 https://github.com/allthingsida/ida-cmake "${IDASDK}/ida-cmake" | |
| - name: Configure (Linux) | |
| run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release | |
| - name: Build (Linux) | |
| run: cmake --build build -- -j2 | |
| - name: Upload Linux artifact (qscripts.so) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: qscripts-linux | |
| path: ${{ env.IDASDK }}/bin/plugins/qscripts.so | |
| build-macos: | |
| name: Build for macOS | |
| runs-on: macos-latest | |
| env: | |
| IDASDK: ${{ github.workspace }}/ida-sdk/src | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v4 | |
| - name: Prepare IDA SDK and helpers | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| git clone --depth 1 https://github.com/HexRaysSA/ida-sdk ida-sdk | |
| mkdir -p "${IDASDK}" | |
| git clone --depth 1 https://github.com/allthingsida/ida-cmake "${IDASDK}/ida-cmake" | |
| - name: Configure (macOS) | |
| run: cmake -S . -B build -DCMAKE_BUILD_TYPE=Release | |
| - name: Build (macOS) | |
| run: cmake --build build -- -j2 | |
| - name: Upload macOS artifact (qscripts.dylib) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: qscripts-macos | |
| path: ${{ env.IDASDK }}/bin/plugins/qscripts.dylib | |
| build-windows: | |
| name: Build for Windows | |
| runs-on: windows-latest | |
| env: | |
| IDASDK: ${{ github.workspace }}/ida-sdk/src | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v4 | |
| - name: Prepare IDA SDK and helpers | |
| shell: bash | |
| run: | | |
| set -euxo pipefail | |
| git clone --depth 1 https://github.com/HexRaysSA/ida-sdk ida-sdk | |
| mkdir -p "${IDASDK}" | |
| git clone --depth 1 https://github.com/allthingsida/ida-cmake "${IDASDK}/ida-cmake" | |
| - name: Configure (Windows) | |
| run: cmake -S . -B build -A x64 | |
| - name: Build (Windows) | |
| run: cmake --build build --config Release -- /m | |
| - name: Upload Windows artifact (qscripts.dll) | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: qscripts-windows | |
| path: ${{ env.IDASDK }}/bin/plugins/qscripts.dll | |
| publish-release: | |
| name: Publish Release | |
| runs-on: ubuntu-latest | |
| needs: [ build-linux, build-macos, build-windows ] | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout project | |
| uses: actions/checkout@v4 | |
| - name: Download all artifacts | |
| uses: actions/download-artifact@v4 | |
| with: | |
| pattern: qscripts-* | |
| path: release | |
| merge-multiple: true | |
| - name: Copy metadata to release folder | |
| run: | | |
| cp ida-plugin.json release/ || echo "No ida-plugin.json found" | |
| - name: List release files | |
| run: | | |
| ls -la release || true | |
| - name: Create zip package | |
| run: | | |
| cd release | |
| if [ -f ida-plugin.json ]; then | |
| zip -9 qscripts-${{ github.ref_name }}.zip qscripts.dll qscripts.so qscripts.dylib ida-plugin.json | |
| else | |
| zip -9 qscripts-${{ github.ref_name }}.zip qscripts.dll qscripts.so qscripts.dylib | |
| fi | |
| ls -lh *.zip | |
| - name: Create GitHub Release and upload assets | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| tag_name: ${{ github.ref_name }} | |
| name: QScripts ${{ github.ref_name }} | |
| draft: false | |
| prerelease: false | |
| generate_release_notes: true | |
| files: | | |
| release/qscripts-${{ github.ref_name }}.zip | |
| release/qscripts.dll | |
| release/qscripts.so | |
| release/qscripts.dylib |