Skip to content

[TMP]

[TMP] #231

Workflow file for this run

name: Build homebrew bottles
on:
# Run when a release is tagged
push:
branches:
- "krendelhoff/bottle-workflow"
permissions:
# Restrict GITHUB_TOKEN permissions
contents: write
pull-requests: write
jobs:
build-bottles:
runs-on: ${{ matrix.os.id }}
strategy:
fail-fast: false
matrix:
os: [ { id: macos-13, name: "ventura" } ]
# we don't bottle meta-formulas that contain only services
formula: [tezos-smart-rollup-wasm-debugger]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install GNU sed
run: |
brew install gnu-sed
echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
- id: extract-tag
name: Extract the right version from the formula
run: echo "tag=$(sed -n 's/^\s\+version \"\(.*\)\"/\1/p' ./Formula/${{ matrix.formula }}.rb)" >> $GITHUB_ENV
- id: check-built
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
name: Check if the bottle has already been built
continue-on-error: true
run: gh release view "${{ env.tag }}" | grep "${{ matrix.formula }}.*\.${{ matrix.os.name }}.bottle.tar.gz"
# tezos-sapling-params is used as a dependency for some of the formulas
# so we handle it separately.
# We don't build the bottle for it because it is never updated over time.
- name: Build tezos-sapling-params
if: steps.check-built.outcome == 'failure'
run: brew install --formula ./Formula/tezos-sapling-params.rb
- name: Build the bottle
if: steps.check-built.outcome == 'failure'
run: ./scripts/build-one-bottle.sh "${{ matrix.formula }}"
timeout-minutes: 120