From 7e2653bced6da855a9ef70d701f73d7b916259a4 Mon Sep 17 00:00:00 2001 From: Kyle Hodgetts Date: Fri, 4 Nov 2022 15:53:14 +0000 Subject: [PATCH] remove check for if package is already published. Simply PUT new publish to aptly api (#950) --- .github/workflows/release.yaml | 23 ++++++----------------- 1 file changed, 6 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index ca4a3747d..05141e239 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -210,23 +210,12 @@ jobs: curl -u ${APTLY_USERNAME}:${PASSWORD} -X POST ${APTLY_URL}/api/repos/kusk/file/kusk?forceReplace=1 ### Create snapshot curl -u ${APTLY_USERNAME}:${PASSWORD} -X POST -H 'Content-Type: application/json' --data '{"Name":"kusk-'${VERSION}'"}' ${APTLY_URL}/api/repos/kusk/snapshots - ### Publish repo - already_published=$(curl --silent -u ${APTLY_USERNAME}:${PASSWORD} ${APTLY_URL}/api/publish | jq ".[] | .Sources | .[] | .Name==\"kusk-${VERSION}\"") - if [[ -z $already_published || $already_published == *"false"* ]]; then - curl \ - -u ${APTLY_USERNAME}:${PASSWORD} \ - -X POST \ - -H 'Content-Type: application/json' \ - --data '{"Storage": "", "SourceKind": "snapshot", "Distribution": "linux", "Sources": [{"Component": "main", "Name": "kusk-'${VERSION}'"}]}' \ - "${APTLY_URL}/api/publish/:kusk" - else - curl \ - -u ${APTLY_USERNAME}:${PASSWORD} \ - -X PUT \ - -H 'Content-Type: application/json' \ - --data '{"Snapshots": [{"Component": "main", "Name": "kusk-'${VERSION}'"}]}' \ - "${APTLY_URL}/api/publish/:${REPO_NAME}/linux" - fi + curl \ + -u ${APTLY_USERNAME}:${PASSWORD} \ + -X PUT \ + -H 'Content-Type: application/json' \ + --data '{"Snapshots": [{"Component": "main", "Name": "kusk-'${VERSION}'"}]}' \ + "${APTLY_URL}/api/publish/:${REPO_NAME}/linux" build-and-publish-windows-installer: needs: release