1
0
Fork 0
mirror of https://github.com/Luzifer/github-publish.git synced 2024-12-21 02:11:22 +00:00

Fix: Extract changelog in correct directory

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2021-08-28 22:35:59 +02:00
parent be4e6ddeb9
commit f7ccbadff2
Signed by: luzifer
GPG key ID: 0066F03ED215AD7D
2 changed files with 5 additions and 7 deletions

View file

@ -1,2 +1,2 @@
05e4977d541b2ef07c757acca912b7b58b379fb425eceb3a1f53c829a78a4aa4 docker2aci.sh 05e4977d541b2ef07c757acca912b7b58b379fb425eceb3a1f53c829a78a4aa4 docker2aci.sh
e7662f4f1e9f7f0610000f4e91da49dfbc6355003490b25fb08f62d50e69a56d golang.sh b9881de9a869366791e7998e5d03d710de1697202908a44316bdd7a023093f5d golang.sh

View file

@ -51,6 +51,8 @@ if [[ $NO_TESTS == false ]]; then
go test "${go_params[@]}" ${PACKAGES} go test "${go_params[@]}" ${PACKAGES}
fi fi
changelog=$([ -f "${PWD}/History.md" ] && awk '/^#/ && ++c==2{exit}; /^#/f' "${PWD}/History.md" || echo "")
step "Cleanup build directory if present" step "Cleanup build directory if present"
rm -rf ${BUILD_DIR} rm -rf ${BUILD_DIR}
@ -125,14 +127,10 @@ fi
if [[ ${DRAFT} == "true" ]]; then if [[ ${DRAFT} == "true" ]]; then
step "Create a drafted release" step "Create a drafted release"
{ echo "${changelog}" | github-release release --user ${GHUSER} --repo ${REPO} --tag ${DEPLOYMENT_TAG} --name ${DEPLOYMENT_TAG} --description - --draft || true
[ -f History.md ] && awk '/^#/ && ++c==2{exit}; /^#/f' History.md || echo ""
} | github-release release --user ${GHUSER} --repo ${REPO} --tag ${DEPLOYMENT_TAG} --name ${DEPLOYMENT_TAG} --description - --draft || true
else else
step "Create a published release" step "Create a published release"
{ echo "${changelog}" | github-release release --user ${GHUSER} --repo ${REPO} --tag ${DEPLOYMENT_TAG} --name ${DEPLOYMENT_TAG} --description - || true
[ -f History.md ] && awk '/^#/ && ++c==2{exit}; /^#/f' History.md || echo ""
} | github-release release --user ${GHUSER} --repo ${REPO} --tag ${DEPLOYMENT_TAG} --name ${DEPLOYMENT_TAG} --description - || true
fi fi
step "Upload build assets" step "Upload build assets"