From c4c4bf124660158b7bc49e911e1c8863bf0e6e2a Mon Sep 17 00:00:00 2001 From: maartenkroon Date: Sat, 26 Oct 2024 20:55:16 +0200 Subject: [PATCH] Tijdelijk de "Delete package or package version" GHA step verwijderd --- .../workflows/build-package-development.yml | 37 ------------------- 1 file changed, 37 deletions(-) diff --git a/.github/workflows/build-package-development.yml b/.github/workflows/build-package-development.yml index 63aac37a..83fc7309 100644 --- a/.github/workflows/build-package-development.yml +++ b/.github/workflows/build-package-development.yml @@ -47,43 +47,6 @@ jobs: - name: Show extracted Maven project groupId, artifactId, version run: printf '%s\n' "$maven_groupId" "$maven_artifactId" "$maven_version" - - name: Delete package or package version - uses: actions/github-script@v7 - id: delete-package-version - with: - script: | - const packageName = process.env.maven_groupId + '.' + process.env.maven_artifactId - const org = context.repo.owner - const versionInfo = await github.rest.packages.getAllPackageVersionsForPackageOwnedByOrg({ - package_type: 'maven', - package_name: packageName, - org: org, - }) - - const versions = versionInfo.data - for (const version of versions) { - if (version.name == process.env.maven_version) { - /* This version is the maven version we want to delete: */ - if (versions.length == 1) { - /* This version is the last version of the package so we have to delete the complete package: */ - await github.rest.packages.deletePackageForOrg({ - package_type: 'maven', - package_name: packageName, - org: context.repo.owner, - }); - } else { - /* Remove this version from the package: */ - await github.rest.packages.deletePackageVersionForOrg({ - package_type: 'maven', - package_name: packageName, - org: context.repo.owner, - package_version_id: version.id, - }); - } - break; - } - } - - name: Publish to GitHub Packages Apache Maven run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml env: