Skip to content

Commit

Permalink
feat(actions): include homebrew bump tap
Browse files Browse the repository at this point in the history
also reactivate if: ref == main on prepare-artifacts and release steps
  • Loading branch information
graelo committed Aug 26, 2022
1 parent c774e98 commit eaf4cd0
Showing 1 changed file with 26 additions and 26 deletions.
52 changes: 26 additions & 26 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
jobs:
prepare-artifacts:
name: Prepare release artifacts
# if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
runs-on: '${{ matrix.os }}'
strategy:
matrix:
Expand Down Expand Up @@ -88,7 +88,7 @@ jobs:

release:
name: Create a GitHub Release
# if: github.ref == 'refs/heads/main'
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
permissions:
contents: write
Expand Down Expand Up @@ -118,29 +118,29 @@ jobs:
bodyFile: "CHANGELOG.md"
token: ${{ secrets.GITHUB_TOKEN }}

# homebrew:
# name: Bump Homebrew formula
# if: github.ref == 'refs/heads/main'
# runs-on: ubuntu-latest
# needs:
# - release
# steps:
# - name: Extract version
# id: extract-version
# run: |
# printf "::set-output name=%s::%s\n" tag-name "${GITHUB_REF#refs/tags/}"
homebrew:
name: Bump Homebrew formula
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs:
- release
steps:
- name: Extract version
id: extract-version
run: |
printf "::set-output name=%s::%s\n" tag-name "${GITHUB_REF#refs/tags/}"
# - uses: mislav/bump-homebrew-formula-action@v2
# if: "!contains(github.ref, '-')" # skip prereleases
# with:
# formula-name: tmux-backup
# formula-path: Formula/tmux-backup.rb
# homebrew-tap: graelo/homebrew-tap
# base-branch: main
# download-url: https://github.com/graelo/homebrew-tap/archive/refs/tags/${{ steps.extract-version.outputs.tag-name }}.tar.gz
# commit-message: |
# {{formulaName}} {{version}}
- uses: mislav/bump-homebrew-formula-action@v2
if: "!contains(github.ref, '-')" # skip prereleases
with:
formula-name: tmux-backup
formula-path: Formula/tmux-backup.rb
homebrew-tap: graelo/homebrew-tap
base-branch: main
download-url: https://github.com/graelo/homebrew-tap/archive/refs/tags/${{ steps.extract-version.outputs.tag-name }}.tar.gz
commit-message: |
{{formulaName}} {{version}}
# Created by https://github.com/mislav/bump-homebrew-formula-action
# env:
# COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
Created by https://github.com/mislav/bump-homebrew-formula-action
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}

0 comments on commit eaf4cd0

Please sign in to comment.