Skip to content

Commit

Permalink
Merge branch 'v4' into v5
Browse files Browse the repository at this point in the history
  • Loading branch information
olets committed Feb 21, 2023
2 parents c473b35 + 9e9707b commit 385e5ad
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 10 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/publish-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Release

on:
release:
types: [published]
jobs:
homebrew:
name: Bump Homebrew formula
runs-on: ubuntu-latest
steps:
- name: Bump v5.x formula
uses: mislav/bump-homebrew-formula-action@v2.2
if: "contains(github.ref, 'v5')"
with:
formula-name: zsh-abbr
formula-path: zsh-abbr.rb
homebrew-tap: olets/homebrew-tap
commit-message: |
feat({{formulaName}}): publish {{version}}
Created by https://github.com/mislav/bump-homebrew-formula-action
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}

- name: Bump v4.x formula
uses: mislav/bump-homebrew-formula-action@v2.2
if: "contains(github.ref, 'v4')"
with:
formula-name: zsh-abbr@4
formula-path: zsh-abbr@4.rb
homebrew-tap: olets/homebrew-tap
commit-message: |
feat({{formulaName}}): publish {{version}}
Created by https://github.com/mislav/bump-homebrew-formula-action
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
12 changes: 2 additions & 10 deletions docs/releasing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,11 @@ The process for cutting new releases.
```
1. Tag the release. Run (replacing `<TAG>` with the tag, `v`-prefixed semver)
```shell
git tagit <TAG>
git tag <TAG>
```
1. Update overall trunk branches. Run
```shell
git push
git checkout master
git merge main
git push
```
Expand All @@ -46,16 +45,9 @@ The process for cutting new releases.
```shell
git push origin <TAG>
```
1. On GitHub cut a new release at the tag. Use the form of existing release notes, replacing the version number, SHA, and CHANGELOG URL. Attach the release binary generated by `git-tagit`.
1. On GitHub cut a new release at the tag. Use the form of existing release notes, replacing the version number, SHA, and CHANGELOG URL. The appropriate formula will automatically update.
1. If the change is to a prerelease, update the Homebrew formula's HEAD branch. Run
```shell
git checkout next
git merge <VERSION TRUNK BRANCH> # e.g. git merge v5
```
1. Update Homebrew:
- If the change is _not_ a prerelease, and bumps the stable version, update [the stable version Homebrew formula](https://github.com/olets/homebrew-tap/blob/main/zsh-abbr.rb):
- update the `url` with the new version number
- update the `sha256` with the binary's SHA
- If the change is _not_ a prerelease, and bumps v4, update [the v4.x Homebrew formula](https://github.com/olets/homebrew-tap/blob/main/zsh-abbr%404.rb):
- update the `url` with the new version number
- update the `sha256` with the binary's SHA

0 comments on commit 385e5ad

Please sign in to comment.