Skip to content
This repository has been archived by the owner on Feb 27, 2024. It is now read-only.

phylum 5.7.2

phylum 5.7.2 #78

Workflow file for this run

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: Set environment
if: ${{ matrix.self_hosted }}
# This environment variable is not documented, but is needed to
# prevent failures and destructive actions added in this commit:
# https://github.com/Homebrew/actions/commit/616a563beaa0715ddebbb39a331224af1b46fdaa
run: echo "GITHUB_ACTIONS_HOMEBREW_SELF_HOSTED=1" >> "$GITHUB_ENV"
- name: Set up Homebrew
uses: Homebrew/actions/setup-homebrew@master
with:
debug: true
- run: brew update
- run: brew uninstall -f phylum || true
- run: brew install --no-binaries --include-test --build-bottle phylum
- 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