forked from vmware-tanzu/community-edition
-
Notifications
You must be signed in to change notification settings - Fork 0
46 lines (44 loc) · 1.57 KB
/
release-homebrew-package.yaml
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
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: Release - Homebrew Package
on:
release:
types:
- released
jobs:
e2e-homebrew-update:
name: E2E - Homebrew Upgrade
# Only run this job if we're in the main repo, not a fork.
if: github.repository == 'vmware-tanzu/community-edition'
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v1
- name: Test Homebrew Upgrade
env:
TCE_CI_BUILD: true
shell: bash
run: |
# downloads from the release page based on BUILD_VERSION below
BUILD_VERSION=${GITHUB_REF/refs\/tags\//} ./hack/homebrew/update-homebrew-test.sh
update-homebrew-package:
name: Update Homebrew Package
# Only run this job if we're in the main repo, not a fork.
if: github.repository == 'vmware-tanzu/community-edition'
runs-on: ubuntu-latest
steps:
- name: Config credentials
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_ACCESS_TOKEN }}
run: |
git config --global pull.rebase true
git config --global url."https://git:${GITHUB_TOKEN}@github.com".insteadOf "https://github.com"
- name: Check out code
uses: actions/checkout@v1
- name: Update Homebrew Package
env:
GITHUB_TOKEN: ${{ secrets.GH_RELEASE_ACCESS_TOKEN }}
ACTUAL_COMMIT_SHA: ${{ github.sha }}
TCE_CI_BUILD: true
shell: bash
run: |
# update-homebrew-package.sh handles which branch we need to update
BUILD_VERSION=${GITHUB_REF/refs\/tags\//} ./hack/homebrew/update-homebrew-package.sh