Update Github release commands
@@ -4,47 +4,35 @@ publish-to-github:
tags:
- "docker-exec"
script:
- - apt update && apt upgrade && apt install -y jq && apt install -y curl
+ - apt update && apt upgrade && apt install -y jq && apt install -y curl && apt install -y zip
# Create Release
- - |
- RELEASE_ID=$(curl -X POST
- -H "Accept: application/vnd.github+json"
- -H "Authorization: Bearer ${GITHUB_TOKEN}"
- -H "X-GitHub-Api-Version: 2022-11-28"
- https://api.github.com/ecsec/open-ecard/releases
- -d '{
- "tag_name":"${CI_COMMIT_TAG}",
- "target_commitish":"master",
- "name":"${CI_COMMIT_TAG}",
- "body":"",
- "draft":false,
- "prerelease":false,
- "generate_release_notes":false
- }'
- | jq '.id')
+ - >-
+ RELEASE_ID=$(curl -u ${GITHUB_USERNAME}:${GITHUB_TOKEN} -X POST -v \
+ -H "Accept: application/vnd.github+json" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ https://api.github.com/repos/ecsec/open-ecard/releases \
+ -d '{ "tag_name":"${CI_COMMIT_TAG}", "name":"${CI_COMMIT_TAG}", "draft":false, "prerelease":false, "generate_release_notes":false }' | jq '.id')
# Upload iOS Framework
- zip -r OpenEcardPod.zip LICENSE* OpenEcard.xcframework
- - |
- curl
- -X POST
- -H "Accept: application/vnd.github+json"
- -H "Authorization: Bearer ${GITHUB_TOKEN}"
- -H "X-GitHub-Api-Version: 2022-11-28"
- -H "Content-Type: application/zip"
- --data-binary "@OpenEcardPod.zip"
+ - >-
+ curl -u ${GITHUB_USERNAME}:${GITHUB_TOKEN} \
+ -X POST -v \
+ -H "Accept: application/vnd.github+json" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ -H "Content-Type: application/zip" \
+ --data-binary "@OpenEcardPod.zip" \
https://uploads.github.com/repos/ecsec/open-ecard/releases/${RELEASE_ID}/assets?name=OpenEcard-CocoaPod.zip
# Upload all installers
- INSTALLERS=(packager/richclient-packager/target/jpackage/* packager/richclient-packager/target/iscc/*)
- - |
+ - >-
for INSTALLER in "${INSTALLERS[@]}"; do
INSTALLER_FILENAME=$(echo "${INSTALLER}" | sed 's:.*/::')
- curl
- -X POST
- -H "Accept: application/vnd.github+json"
- -H "Authorization: Bearer ${GITHUB_TOKEN}"
- -H "X-GitHub-Api-Version: 2022-11-28"
- -H "Content-Type: application/zip"
- --data-binary "@${INSTALLER}"
+ curl -u ${GITHUB_USERNAME}:${GITHUB_TOKEN} \
+ -X POST -v \
+ -H "Accept: application/vnd.github+json" \
+ -H "X-GitHub-Api-Version: 2022-11-28" \
+ -H "Content-Type: application/octet-stream" \
+ --data-binary "@${INSTALLER}" \
https://uploads.github.com/repos/ecsec/open-ecard/releases/${RELEASE_ID}/assets?name=${INSTALLER_FILENAME}
done
dependencies:
