forked from Chatterino/chatterino2
-
Notifications
You must be signed in to change notification settings - Fork 0
28 lines (25 loc) · 1016 Bytes
/
homebrew.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
name: 'Publish Homebrew Cask on Release'
on:
push:
tags:
# Should match semver for mainline releases (not including -beta)
- 'v2.[0-9]+.[0-9]+'
# TODO: handle beta and nightly releases
# Need to make those casks manually first
# - v2.[0-9]+.[0-9]+-beta(?:[0-9]+)
env:
# This gets updated later on in the run by a bash script to strip the prefix
C2_CASK_NAME: 'chatterino'
C2_TAGGED_VERSION: '${{ github.ref }}'
jobs:
update_stable_homebrew_cask:
name: 'Update the stable homebrew cask'
runs-on: 'macos-latest'
steps:
# Pulls out the version from the ref (e.g. refs/tags/v2.3.1 -> 2.3.1)
- name: 'Extract version from tag'
run: |
'STRIPPED_VERSION=$("refs/tags/$(C2_TAGGED_VERSION)" | sed "s/refs\/tags\/v//gm")'
'echo "C2_TAGGED_VERSION=$(STRIPPED_VERSION)" >> $GITHUB_ENV'
- name: 'Execute ''brew bump-cask-pr'' with version'
run: 'brew bump-cask-pr --version $(C2_TAGGED_VERSION) $(C2_CASK_NAME)'