Skip to content

Commit 1188aca

Browse files
committed
patch homebrew action to manually release v1.34.1
1 parent 6756321 commit 1188aca

File tree

1 file changed

+24
-31
lines changed

1 file changed

+24
-31
lines changed

.github/workflows/homebrew.yml

Lines changed: 24 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,38 @@
11
name: homebrew
2-
on:
3-
release:
4-
types: [released]
2+
on: workflow_dispatch
53

64
jobs:
75
download-and-archive:
86
runs-on: ubuntu-latest
97
steps:
108
- name: macOS/amd64 binary
11-
if: startsWith(github.ref, 'refs/tags/')
129
run: |
13-
version="${GITHUB_REF##*/}"
14-
semvar="${version:1}"
10+
version="v1.34.1"
11+
semvar="1.34.1"
1512
curl -Lo copilot-darwin-amd64 https://github.com/aws/copilot-cli/releases/download/${version}/copilot-darwin-amd64
1613
cp copilot-darwin-amd64 copilot
1714
chmod +x copilot
1815
tar czf copilot_${semvar}_macOS_amd64.tar.gz copilot
1916
- name: macOS/arm64 binary
20-
if: startsWith(github.ref, 'refs/tags/')
2117
run: |
22-
version="${GITHUB_REF##*/}"
23-
semvar="${version:1}"
18+
version="v1.34.1"
19+
semvar="1.34.1"
2420
curl -Lo copilot-darwin-arm64 https://github.com/aws/copilot-cli/releases/download/${version}/copilot-darwin-arm64
2521
cp copilot-darwin-arm64 copilot
2622
chmod +x copilot
2723
tar czf copilot_${semvar}_macOS_arm64.tar.gz copilot
2824
- name: linux/amd64 binary
29-
if: startsWith(github.ref, 'refs/tags/')
3025
run: |
31-
version="${GITHUB_REF##*/}"
32-
semvar="${version:1}"
26+
version="v1.34.1"
27+
semvar="1.34.1"
3328
curl -Lo copilot-linux https://github.com/aws/copilot-cli/releases/download/${version}/copilot-linux
3429
cp copilot-linux copilot
3530
chmod +x copilot
3631
tar czf copilot_${semvar}_linux_amd64.tar.gz copilot
3732
- name: linux/arm64 binary
38-
if: startsWith(github.ref, 'refs/tags/')
3933
run: |
40-
version="${GITHUB_REF##*/}"
41-
semvar="${version:1}"
34+
version="v1.34.1"
35+
semvar="1.34.1"
4236
curl -Lo copilot-linux-arm64 https://github.com/aws/copilot-cli/releases/download/${version}/copilot-linux-arm64
4337
cp copilot-linux-arm64 copilot
4438
chmod +x copilot
@@ -60,7 +54,6 @@ jobs:
6054
name: save tar files
6155
- name: Update release
6256
uses: softprops/action-gh-release@v1
63-
if: startsWith(github.ref, 'refs/tags/')
6457
with:
6558
files: '*.tar.gz'
6659

@@ -82,41 +75,41 @@ jobs:
8275
path: 'homebrew-tap'
8376
- name: Update version
8477
run: |
85-
version="${GITHUB_REF##*/}"
86-
semvar="${version:1}"
78+
version="v1.34.1"
79+
semvar="1.34.1"
8780
tmp=$(mktemp)
8881
jq --arg version "${semvar}" '.version = $version' homebrew-tap/bottle-configs/copilot-cli.json > "$tmp" && mv "$tmp" homebrew-tap/bottle-configs/copilot-cli.json
8982
- name: Update root_url
9083
run: |
9184
tmp=$(mktemp)
92-
version="${GITHUB_REF##*/}"
93-
semvar="${version:1}"
85+
version="v1.34.1"
86+
semvar="1.34.1"
9487
jq --arg version "${version}" --arg semvar "${semvar}" '.bottle.root_url = "https://github.com/aws/copilot-cli/releases/download/" + $version + "/copilot_" + $semvar + "_"' homebrew-tap/bottle-configs/copilot-cli.json > "$tmp" && mv "$tmp" homebrew-tap/bottle-configs/copilot-cli.json
9588
- name: Update sierra
9689
run: |
97-
version="${GITHUB_REF##*/}"
98-
semvar="${version:1}"
90+
version="v1.34.1"
91+
semvar="1.34.1"
9992
sha=$(openssl dgst -sha256 ${{steps.download.outputs.download-path}}/copilot_${semvar}_macOS_amd64.tar.gz | awk '{print $NF}')
10093
tmp=$(mktemp)
10194
jq --arg sha "$sha" '.bottle.sha256.sierra = "'$sha'"' homebrew-tap/bottle-configs/copilot-cli.json > "$tmp" && mv "$tmp" homebrew-tap/bottle-configs/copilot-cli.json
10295
- name: Update arm64_big_sur
10396
run: |
104-
version="${GITHUB_REF##*/}"
105-
semvar="${version:1}"
97+
version="v1.34.1"
98+
semvar="1.34.1"
10699
sha=$(openssl dgst -sha256 ${{steps.download.outputs.download-path}}/copilot_${semvar}_macOS_arm64.tar.gz | awk '{print $NF}')
107100
tmp=$(mktemp)
108101
jq --arg sha "$sha" '.bottle.sha256.arm64_big_sur = "'$sha'"' homebrew-tap/bottle-configs/copilot-cli.json > "$tmp" && mv "$tmp" homebrew-tap/bottle-configs/copilot-cli.json
109102
- name: Update linux
110103
run: |
111-
version="${GITHUB_REF##*/}"
112-
semvar="${version:1}"
104+
version="v1.34.1"
105+
semvar="1.34.1"
113106
sha=$(openssl dgst -sha256 ${{steps.download.outputs.download-path}}/copilot_${semvar}_linux_amd64.tar.gz | awk '{print $NF}')
114107
tmp=$(mktemp)
115108
jq --arg sha "$sha" '.bottle.sha256.linux = "'$sha'"' homebrew-tap/bottle-configs/copilot-cli.json > "$tmp" && mv "$tmp" homebrew-tap/bottle-configs/copilot-cli.json
116109
- name: Update linux_arm
117110
run: |
118-
version="${GITHUB_REF##*/}"
119-
semvar="${version:1}"
111+
version="v1.34.1"
112+
semvar="1.34.1"
120113
sha=$(openssl dgst -sha256 ${{steps.download.outputs.download-path}}/copilot_${semvar}_linux_arm64.tar.gz | awk '{print $NF}')
121114
tmp=$(mktemp)
122115
jq --arg sha "$sha" '.bottle.sha256.linux_arm = "'$sha'"' homebrew-tap/bottle-configs/copilot-cli.json > "$tmp" && mv "$tmp" homebrew-tap/bottle-configs/copilot-cli.json
@@ -126,12 +119,12 @@ jobs:
126119
git config user.name 'ecs-cicd-bot'
127120
git config user.email 'ecs-cicd-bot@users.noreply.github.com'
128121
git add bottle-configs/copilot-cli.json
129-
git commit -m "chore: upgrade copilot-cli to ${GITHUB_REF##*/}"
122+
git commit -m "chore: upgrade copilot-cli to v1.34.1"
130123
- name: Set pull-request variables
131124
id: vars
132125
run: |
133-
echo version="${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
134-
echo pr_title="chore: upgrade copilot-cli to ${GITHUB_REF##*/}" >> $GITHUB_OUTPUT
126+
echo version="v1.34.1" >> $GITHUB_OUTPUT
127+
echo pr_title="chore: upgrade copilot-cli to v1.34.1" >> $GITHUB_OUTPUT
135128
echo pr_body="Created by ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}. @aws/aws-ecs-devx" >> $GITHUB_OUTPUT
136129
- name: Create pull-request
137130
uses: peter-evans/create-pull-request@v3

0 commit comments

Comments
 (0)