-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Automate draft release creation with Goreleaser
Go releaser builds the release artefacts and creates a draft release on Github
- Loading branch information
1 parent
25b8ced
commit a96dc6d
Showing
7 changed files
with
72 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,20 @@ | ||
#!/bin/bash -e | ||
|
||
git fetch --tags # jenkins does not do this automatically yet | ||
CURRENT_DIR=$(pwd) | ||
|
||
echo "Current dir: $CURRENT_DIR" | ||
|
||
MOUNT_DIR="/summon" | ||
|
||
GORELEASER_IMAGE="goreleaser/goreleaser:latest-cgo" | ||
GORELEASER_IMAGE="goreleaser/goreleaser:latest" | ||
|
||
git fetch --tags # jenkins does not do this automatically yet | ||
|
||
docker pull "$GORELEASER_IMAGE" | ||
docker pull "${GORELEASER_IMAGE}" | ||
docker run --rm -t \ | ||
--env GITHUB_TOKEN \ | ||
-v "$CURRENT_DIR:$MOUNT_DIR" \ | ||
-w "$MOUNT_DIR" \ | ||
"${GORELEASER_IMAGE}" --rm-dist "$@" | ||
|
||
docker run --rm \ | ||
-v "$PWD:/summon" \ | ||
-w /summon \ | ||
"$GORELEASER_IMAGE" release --rm-dist "$@" | ||
echo "Releases built. Archives can be found in dist/goreleaser" |