Skip to content

Commit 3fce14f

Browse files
authored
Merge pull request #3010 from cdr/jsjoeio/add-homebrew-publish-workflow
feat(ci): add homebrew job to publish workflow
2 parents 5a1ea2c + 5b9f6bb commit 3fce14f

File tree

2 files changed

+29
-0
lines changed

2 files changed

+29
-0
lines changed

.github/workflows/publish.yaml

+16
Original file line numberDiff line numberDiff line change
@@ -33,3 +33,19 @@ jobs:
3333
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3434
DOCKER_USERNAME: ${{ secrets.DOCKER_USERNAME }}
3535
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
36+
37+
homebrew:
38+
# The newest version of code-server needs to be available on npm when this runs
39+
# otherwise, it will 404 and won't open a PR to bump version on homebrew/homebrew-core
40+
needs: npm
41+
runs-on: macos-latest
42+
steps:
43+
- uses: actions/checkout@v2
44+
- name: Configure git
45+
run: |
46+
git config user.name github-actions
47+
git config user.email [email protected]
48+
- name: Bump code-server homebrew version
49+
env:
50+
HOMEBREW_GITHUB_API_TOKEN: ${{secrets.HOMEBREW_GITHUB_API_TOKEN}}
51+
run: ./ci/steps/brew-bump.sh

ci/steps/brew-bump.sh

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
set -euo pipefail
3+
4+
main() {
5+
cd "$(dirname "$0")/../.."
6+
# Only sourcing this so we get access to $VERSION
7+
source ./ci/lib.sh
8+
# Find the docs for bump-formula-pr here
9+
# https://github.com/Homebrew/brew/blob/master/Library/Homebrew/dev-cmd/bump-formula-pr.rb#L18
10+
brew bump-formula-pr --force --version="${VERSION}" code-server --no-browse --no-audit
11+
}
12+
13+
main "$@"

0 commit comments

Comments
 (0)