Skip to content

Commit 3a343d0

Browse files
author
Pulak Bhowmick
committed
install hub with brew
1 parent 621fc6d commit 3a343d0

File tree

3 files changed

+20
-33
lines changed

3 files changed

+20
-33
lines changed

.github/workflows/swift.yml

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -57,21 +57,17 @@ jobs:
5757
- uses: maxim-lobanov/setup-xcode@v1
5858
with:
5959
xcode-version: 14.1.0
60-
- uses: actions/checkout@v2
61-
with:
62-
# You should create a personal access token and store it in your repository
63-
token: ${{ secrets.CI_USER_TOKEN }}
64-
repository: 'optimizely/travisci-tools'
65-
path: 'home/runner/travisci-tools'
66-
ref: 'master'
67-
- name: Install hub
68-
shell: bash
69-
env:
70-
HOME: 'home/runner'
60+
- name: Install Homebrew
61+
run: |
62+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
63+
64+
- name: Install Hub
65+
run: |
66+
brew install hub
67+
68+
- name: Verify Hub Installation
7169
run: |
72-
# installs hub to ~/bin
73-
$HOME/travisci-tools/release_github/install_hub.sh
74-
echo "$HOME/bin:$HOME/travisci-tools/release_github" >> $GITHUB_PATH
70+
hub version
7571
- id: prepare_for_release
7672
name: Prepare for release
7773
env:
@@ -96,21 +92,17 @@ jobs:
9692
- uses: maxim-lobanov/setup-xcode@v1
9793
with:
9894
xcode-version: 14.1.0
99-
- uses: actions/checkout@v2
100-
with:
101-
# You should create a personal access token and store it in your repository
102-
token: ${{ secrets.CI_USER_TOKEN }}
103-
repository: 'optimizely/travisci-tools'
104-
path: 'home/runner/travisci-tools'
105-
ref: 'master'
106-
- name: Install hub
107-
shell: bash
108-
env:
109-
HOME: 'home/runner'
95+
- name: Install Homebrew
96+
run: |
97+
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
98+
99+
- name: Install Hub
100+
run: |
101+
brew install hub
102+
103+
- name: Verify Hub Installation
110104
run: |
111-
# installs hub to ~/bin
112-
$HOME/travisci-tools/release_github/install_hub.sh
113-
echo "$HOME/bin:$HOME/travisci-tools/release_github" >> $GITHUB_PATH
105+
hub version
114106
- name: Push to cocoapods.org
115107
env:
116108
HOME: 'home/runner'

Scripts/run_prep.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,7 @@ END
9999
}
100100
git push -f https://${GITHUB_TOKEN}@github.com/${REPO_SLUG} ${AUTOBRANCH}
101101

102-
pwd
103102
hub version
104-
pwd
105103
PR_URL=$(hub pull-request -b ${BRANCH} -h ${AUTOBRANCH} -m "${MESSAGE}")
106104
echo -e "${COLOR_CYAN}ATTENTION:${COLOR_RESET} review and merge ${COLOR_CYAN}${PR_URL}${COLOR_RESET}"
107105
echo "then to release to cocoapods use Git action's Trigger build with the following payload:"

Scripts/run_release.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,9 +93,6 @@ function release_github {
9393
LAST_VERSION=$(grep '^## \d\+\.\d\+.\d\+' ${CHANGELOG} | awk 'NR==2')
9494

9595
DESCRIPTION=$(awk "/^${NEW_VERSION}$/,/^${LAST_VERSION:-nothingmatched}$/" ${CHANGELOG} | grep -v "^${LAST_VERSION:-nothingmatched}$")
96-
HOME=$(pwd)
97-
pwd
98-
install_binary mislav hub
9996
hub version
10097
hub release create v${VERSION} -m "Release ${VERSION}" -m "${DESCRIPTION}" -t "${BRANCH}"
10198
}

0 commit comments

Comments
 (0)