1
0
mirror of https://github.com/Luzifer/github-publish.git synced 2024-09-19 07:52:56 +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
e7662f4f1e9f7f0610000f4e91da49dfbc6355003490b25fb08f62d50e69a56d golang.sh
b9881de9a869366791e7998e5d03d710de1697202908a44316bdd7a023093f5d golang.sh

View File

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