mfc: v5.1.0 #9
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: Bottle | |
| on: | |
| pull_request: | |
| paths: ['Formula/*.rb'] | |
| push: | |
| branches: [ main ] | |
| paths: ['Formula/*.rb'] | |
| workflow_dispatch: | |
| inputs: | |
| mode: | |
| description: 'Run mode' | |
| type: choice | |
| options: [test, publish] | |
| default: test | |
| permissions: | |
| contents: write | |
| jobs: | |
| test-bot: | |
| runs-on: macos-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: Homebrew/actions/setup-homebrew@master | |
| - name: Build/test (PR or manual test) | |
| if: github.event_name == 'pull_request' || (github.event_name == 'workflow_dispatch' && inputs.mode == 'test') | |
| env: | |
| HOMEBREW_NO_ANALYTICS: 1 | |
| HOMEBREW_NO_AUTO_UPDATE: 1 | |
| run: | | |
| brew test-bot \ | |
| --only-formulae \ | |
| --tap="$GITHUB_REPOSITORY" \ | |
| --skip-relocation \ | |
| --skip-online-checks \ | |
| --skip-new \ | |
| --skip-stable-version-audit \ | |
| --skip-revision-audit \ | |
| --skip-checksum-only-audit \ | |
| --skip-livecheck \ | |
| mfc | |
| - name: Build, bottle, and publish (push to main or manual publish) | |
| if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.mode == 'publish') | |
| env: | |
| HOMEBREW_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| HOMEBREW_NO_ANALYTICS: 1 | |
| HOMEBREW_NO_AUTO_UPDATE: 1 | |
| run: | | |
| brew test-bot \ | |
| --only-formulae \ | |
| --tap="$GITHUB_REPOSITORY" \ | |
| --publish \ | |
| --skip-relocation \ | |
| --skip-online-checks \ | |
| --skip-new \ | |
| --skip-stable-version-audit \ | |
| --skip-revision-audit \ | |
| --skip-checksum-only-audit \ | |
| --skip-livecheck \ | |
| mfc | |
| verify-install: | |
| if: github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.mode == 'publish') | |
| needs: test-bot | |
| runs-on: macos-latest | |
| steps: | |
| - uses: Homebrew/actions/setup-homebrew@master | |
| - name: Tap and install bottled formula | |
| env: | |
| HOMEBREW_NO_ANALYTICS: 1 | |
| HOMEBREW_NO_AUTO_UPDATE: 1 | |
| run: | | |
| brew untap "$GITHUB_REPOSITORY" || true | |
| brew tap "$GITHUB_REPOSITORY" | |
| brew uninstall --force mfc || true | |
| for i in {1..6}; do | |
| if brew install MFlowCode/mfc/mfc; then break; fi | |
| echo "Retrying in 20s (attempt $i/6) ..." && sleep 20 | |
| done | |
| brew test MFlowCode/mfc/mfc || mfc --help |