Skip to content

update homebrew

update homebrew #15

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
jobs:
update-homebrew:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
with:
# 0必要?
fetch-depth: 0
- name: Build MacOS binary
id: build-macos-binary
uses: taiki-e/upload-rust-binary-action@v1
with:
bin: tera
target: x86_64-apple-darwin
archive: tera-cli-$target
checksum: sha256
dry-run: true
- name: Get Release Version
id: get-release-version
run: |
echo GITHUB_REF=$GITHUB_REF
RELEASE_VERSION=${GITHUB_REF#refs/*/}
RAW_VERSION=${RELEASE_VERSION:1}
echo "RAW_VERSION=$RAW_VERSION" >> $GITHUB_OUTPUT
# We do that before hecking out master (in case we were not in master already)
- name: Prepare new Formula
env:
NAME: Tera
DESCRIPTION: "A command line utility written in Rust to render templates using the tera templating engine"
SITE: https://github.com
REPO: chevdor/tera-cli
ARCHIVE: ${{ steps.build-macos-binary.outputs.archive }}
SHA256: ${{ steps.build-macos-binary.outputs.sha256 }}
VERSION: ${{ steps.get-release-version.outputs.RAW_VERSION }}
run: |
tera --version
tera --template templates/formula.rb --env-only > $HOME/tera.rb
cat $HOME/tera.rb