This repository has been archived by the owner on Feb 27, 2024. It is now read-only.
phylum 5.7.2 #84
Workflow file for this run
This file contains 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: Publish Bottles | |
on: | |
pull_request: | |
paths: | |
- Formula/phylum.rb | |
jobs: | |
build-bottles: | |
strategy: | |
matrix: | |
os: | |
- macos-12 | |
- macos-13 | |
include: | |
- os: [self-hosted, macos, arm64] | |
self_hosted: true | |
runs-on: ${{ matrix.os }} | |
steps: | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
- name: Setup environment | |
run: | | |
echo "HOMEBREW_NO_AUTO_UPDATE=1" >> "$GITHUB_ENV" | |
echo "HOMEBREW_VERBOSE=1" >> "$GITHUB_ENV" | |
echo "HOMEBREW_DEBUG=1" >> "$GITHUB_ENV" | |
- run: brew config | |
- run: brew uninstall -f phylum || true | |
- run: brew install --include-test --build-bottle Formula/phylum.rb | |
- run: brew test phylum | |
- name: brew bottle | |
run: | | |
VERSION=$(brew list --versions phylum | cut "-d " -f2) | |
brew bottle --json --root-url "https://github.com/phylum-dev/homebrew-cli/releases/download/phylum-$VERSION" phylum | |
- name: Upload bottles as artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: bottles | |
path: '*.bottle.*' | |
brew-bottle: | |
runs-on: ubuntu-latest | |
needs: build-bottles | |
steps: | |
- name: Set up Homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
with: | |
debug: true | |
- name: Checkout the repository | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.head_ref }} | |
- name: Set up git | |
uses: Homebrew/actions/git-user-config@master | |
- name: Download bottle artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: bottles | |
- name: Merge bottles | |
run: brew bottle --merge --write --debug ./*.bottle.json | |
- name: Push commits | |
run: git push | |
publish-bottles: | |
runs-on: ubuntu-latest | |
needs: brew-bottle | |
environment: release | |
steps: | |
- name: Set up Homebrew | |
uses: Homebrew/actions/setup-homebrew@master | |
with: | |
debug: true | |
- name: Download bottle artifacts | |
uses: actions/download-artifact@v3 | |
with: | |
name: bottles | |
- name: Upload bottles | |
env: | |
HOMEBREW_GITHUB_API_TOKEN: ${{ github.token }} | |
run: brew pr-upload --debug --upload-only |