Improve pull_release_artifacts
This commit is contained in:
parent
89ae54a083
commit
ae625b181c
@ -7,6 +7,7 @@ shopt -s extglob
|
|||||||
|
|
||||||
RELEASE=$1
|
RELEASE=$1
|
||||||
SIGNER=$2
|
SIGNER=$2
|
||||||
|
TAG=${RELEASE/v/}
|
||||||
|
|
||||||
echo "RELEASE: $RELEASE"
|
echo "RELEASE: $RELEASE"
|
||||||
echo "SIGNER: $SIGNER"
|
echo "SIGNER: $SIGNER"
|
||||||
@ -19,7 +20,7 @@ done
|
|||||||
|
|
||||||
mkdir -p "gh-release-artifacts/${RELEASE}"
|
mkdir -p "gh-release-artifacts/${RELEASE}"
|
||||||
|
|
||||||
git archive --format=tar.gz -o "gh-release-artifacts/${RELEASE}/ghcup-${RELEASE}-src.tar.gz" --prefix="ghcup-${RELEASE}/" HEAD
|
git archive --format=tar.gz -o "gh-release-artifacts/${RELEASE}/ghcup-${TAG}-src.tar.gz" --prefix="ghcup-${TAG}/" HEAD
|
||||||
|
|
||||||
cd "gh-release-artifacts/${RELEASE}"
|
cd "gh-release-artifacts/${RELEASE}"
|
||||||
|
|
||||||
@ -27,10 +28,10 @@ cd "gh-release-artifacts/${RELEASE}"
|
|||||||
gh release download "$RELEASE"
|
gh release download "$RELEASE"
|
||||||
|
|
||||||
# cirrus
|
# cirrus
|
||||||
curl -L -o "x86_64-portbld-freebsd-ghcup-${RELEASE}" \
|
curl -L -o "x86_64-portbld-freebsd-ghcup-${TAG}" \
|
||||||
"https://api.cirrus-ci.com/v1/artifact/github/haskell/ghcup-hs/build/binaries/out/x86_64-portbld-freebsd-ghcup-${RELEASE}?branch=${RELEASE}"
|
"https://api.cirrus-ci.com/v1/artifact/github/haskell/ghcup-hs/build/binaries/out/x86_64-portbld-freebsd-ghcup-${RELEASE}?branch=${RELEASE}"
|
||||||
|
|
||||||
sha256sum ./*-ghcup-* > SHA256SUMS
|
sha256sum ./*-ghcup-* > SHA256SUMS
|
||||||
gpg --detach-sign -u "${SIGNER}" SHA256SUMS
|
gpg --detach-sign -u "${SIGNER}" SHA256SUMS
|
||||||
|
|
||||||
gh release upload "$RELEASE" "ghcup-${RELEASE}-src.tar.gz" "x86_64-portbld-freebsd-ghcup-${RELEASE}" SHA256SUMS SHA256SUMS.sig
|
gh release upload "$RELEASE" "ghcup-${TAG}-src.tar.gz" "x86_64-portbld-freebsd-ghcup-${TAG}" SHA256SUMS SHA256SUMS.sig
|
||||||
|
Loading…
Reference in New Issue
Block a user