Add osaurus.macos-use v3.0.2 #287
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: Validate Plugins | |
| on: | |
| push: | |
| branches: [master, main] | |
| paths: | |
| - "plugins/**" | |
| - "scripts/validate.py" | |
| pull_request: | |
| branches: [master, main] | |
| jobs: | |
| discord-notify: | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'push' | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Get changed plugins | |
| id: changes | |
| run: | | |
| # Get list of changed plugin files | |
| CHANGED=$(git diff --name-only HEAD~1 HEAD -- 'plugins/*.json' | head -1) | |
| if [ -z "$CHANGED" ]; then | |
| echo "No plugin changes detected" | |
| echo "skip=true" >> $GITHUB_OUTPUT | |
| exit 0 | |
| fi | |
| # Extract plugin_id and latest version from the changed file | |
| PLUGIN_ID=$(jq -r '.plugin_id' "$CHANGED") | |
| VERSION=$(jq -r '.versions[0].version' "$CHANGED") | |
| echo "plugin_id=$PLUGIN_ID" >> $GITHUB_OUTPUT | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| echo "skip=false" >> $GITHUB_OUTPUT | |
| echo "Detected update: $PLUGIN_ID v$VERSION" | |
| - name: Post to Discord | |
| if: steps.changes.outputs.skip != 'true' | |
| env: | |
| DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }} | |
| PLUGIN_ID: ${{ steps.changes.outputs.plugin_id }} | |
| VERSION: ${{ steps.changes.outputs.version }} | |
| run: | | |
| if [ -z "$DISCORD_WEBHOOK" ]; then | |
| echo "DISCORD_WEBHOOK not configured, skipping" | |
| exit 0 | |
| fi | |
| jq -n \ | |
| --arg content "🔧 **New Tool Update!**" \ | |
| --arg plugin "$PLUGIN_ID" \ | |
| --arg version "$VERSION" \ | |
| --arg page "[View Release](https://github.com/${{ github.repository }}/commit/${{ github.sha }})" \ | |
| '{ | |
| content: $content, | |
| embeds: [ | |
| { | |
| title: ($plugin + " v" + $version), | |
| color: 5814783, | |
| fields: [ | |
| { name: "📋 Release", value: $page, inline: true } | |
| ], | |
| footer: { text: "Released via GitHub Actions" }, | |
| timestamp: (now | strftime("%Y-%m-%dT%H:%M:%S.000Z")) | |
| } | |
| ] | |
| }' > payload.json | |
| curl -f -X POST -H "Content-Type: application/json" --data @payload.json "$DISCORD_WEBHOOK" | |
| echo "Discord notification sent" | |
| validate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Full history for base branch comparison | |
| - name: Fetch base branch | |
| if: github.event_name == 'pull_request' | |
| run: git fetch origin ${{ github.base_ref }} | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install minisign | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y minisign | |
| - name: Validate plugin manifests | |
| env: | |
| VERIFY_SIGNATURES: "true" | |
| GITHUB_BASE_REF: ${{ github.base_ref }} | |
| run: python scripts/validate.py | |
| build-check: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Xcode | |
| uses: maxim-lobanov/setup-xcode@v1 | |
| with: | |
| xcode-version: latest-stable | |
| - name: Build all plugins | |
| run: | | |
| for tool in time browser fetch search; do | |
| echo "Building $tool..." | |
| cd tools/$tool | |
| swift build -c release | |
| cd ../.. | |
| done |