Skip to content

Commit

Permalink
[TMP]
Browse files Browse the repository at this point in the history
  • Loading branch information
krendelhoff2 committed Nov 26, 2024
1 parent ee609d1 commit 2088bfd
Showing 1 changed file with 3 additions and 49 deletions.
52 changes: 3 additions & 49 deletions .github/workflows/build-bottles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ name: Build homebrew bottles
on:
# Run when a release is tagged
push:
tags:
- "v*"
branches:
- "krendelhoff/bottle-workflow"
permissions:
# Restrict GITHUB_TOKEN permissions
contents: write
Expand All @@ -17,7 +17,7 @@ jobs:
matrix:
os: [ { id: macos-13, name: "ventura" } ]
# we don't bottle meta-formulas that contain only services
formula: [tezos-smart-rollup-wasm-debugger, tezos-smart-rollup-node, tezos-dac-client, tezos-dac-node, tezos-dal-node, tezos-signer, tezos-codec, tezos-client, tezos-admin-client, tezos-node, tezos-accuser-PsQuebec, tezos-baker-PsQuebec, tezos-accuser-PsParisC, tezos-baker-PsParisC]
formula: [tezos-smart-rollup-wasm-debugger]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -49,49 +49,3 @@ jobs:
if: steps.check-built.outcome == 'failure'
run: ./scripts/build-one-bottle.sh "${{ matrix.formula }}"
timeout-minutes: 120

- name: Upload the bottle to Github Actions
if: steps.check-built.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.formula }}-${{ github.run_id }}
path: '*.bottle.*'

- name: Attach the bottle to the release
if: steps.check-built.outcome == 'failure'
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: gh release upload "${{ env.tag }}" *.bottle.*

sync-hashes:
runs-on: macos-13
needs: build-bottles
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
- name: Install coreutils for macOS # for sha256sum
run: brew install coreutils

# Since using the tag that triggered the pipeline isn't very resilient, we use the version
# from the tezos-client formula, which hopefully will stay the most up-to-date.
- id: extract-tag
name: Extract the right version from the formula
run: echo "tag=$(sed -n 's/^\s\+version \"\(.*\)\"/\1/p' ./Formula/tezos-client.rb)" >> $GITHUB_ENV

# It's possible we have had to rerun the building workflow, skipping some jobs and
# erasing the previously built bottles, so we use the release to download them all
- name: Download Ventura bottles from the release
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: gh release download "${{ github.ref_name }}" -p "*.ventura.bottle.tar.gz" -D "./Ventura"

- name: Add bottle hashes to formulae
env:
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: ./scripts/sync-bottle-hashes.sh "${{ github.ref_name }}" "Ventura"

0 comments on commit 2088bfd

Please sign in to comment.