Skip to content

Commit 605ca99

Browse files
authored
release: latest round of goreleaser patches (#478)
Patches the brew formula script and updates the goreleaser version to the latest available version. Signed-off-by: Marc Lopez <marc5.12@outlook.com>
1 parent 009833c commit 605ca99

File tree

2 files changed

+18
-3
lines changed

2 files changed

+18
-3
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ jobs:
5454
run: echo ::set-output name=BUILT::$(date -u +%a_%d_%b_%H:%M:%S_%Y)
5555

5656
- name: Run GoReleaser
57-
uses: goreleaser/goreleaser-action@v1
57+
uses: goreleaser/goreleaser-action@v2
5858
env:
5959
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_EXTRA }}
6060
VERSION: ${{ steps.get_version.outputs.VERSION }}

scripts/update-brew-tap.sh

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,24 @@ hub fork --no-remote
3030
hub remote add fork https://github.com/${GITHUB_USER}/homebrew-tap
3131
hub add Formula/ecctl.rb
3232
hub checkout -b f/update-ecctl-formula-to-${VERSION}
33-
git config user.email "${GIT_AUTHOR_EMAIL}"
34-
git config user.name "${GIT_AUTHOR_NAME}"
33+
34+
if [ ! -z ${GIT_AUTHOR_EMAIL} ]; then
35+
git config --local user.email "${GIT_AUTHOR_EMAIL}"
36+
fi
37+
38+
if [ ! -z ${GIT_AUTHOR_NAME} ]; then
39+
git config --local user.name "${GIT_AUTHOR_NAME}"
40+
fi
41+
3542
git config --global hub.protocol https
3643
git commit -m "Update ecctl version to ${VERSION}"
44+
45+
if [ ${CI} ]; then
46+
git config --global url."https://${GITHUB_TOKEN}:x-oauth-basic@github.com/".insteadOf "https://github.com/"
47+
fi
48+
49+
echo "-> Printing ecctl formula..."
50+
cat Formula/ecctl.rb
51+
3752
hub push fork f/update-ecctl-formula-to-${VERSION}
3853
hub pull-request -m "Update ecctl version to ${VERSION}" -m "Created through automation by update-brew-tap.sh"

0 commit comments

Comments
 (0)