diff --git a/.github/workflows/include-deploy-snapshot.yml b/.github/workflows/include-deploy-snapshot.yml index 95030c3d5a..3f5a5b1842 100644 --- a/.github/workflows/include-deploy-snapshot.yml +++ b/.github/workflows/include-deploy-snapshot.yml @@ -13,6 +13,11 @@ jobs: name: Deploy SNAPSHOT steps: + - name: Remove unnecessary files + run: | + sudo rm -rf /usr/share/dotnet + sudo rm -rf "$AGENT_TOOLSDIRECTORY" + - name: git checkout uses: actions/checkout@v3 with: @@ -42,4 +47,6 @@ jobs: MAVEN_CENTRAL_USER: ${{ secrets.MAVEN_CENTRAL_USER }} MAVEN_CENTRAL_PASSWORD: ${{ secrets.MAVEN_CENTRAL_PASSWORD }} working-directory: tools - run: kotlin ./publish_snapshots.main.kts "../" "${{ inputs.version-label }}" "$GPG_SIGNING_KEY" "$GPG_PASS_PHRASE" "$MAVEN_CENTRAL_USER" "$MAVEN_CENTRAL_PASSWORD" + run: | + export GPG_TTY=$(tty) + kotlin ./publish_snapshots.main.kts "../" "${{ inputs.version-label }}" "$GPG_SIGNING_KEY" "$GPG_PASS_PHRASE" "$MAVEN_CENTRAL_USER" "$MAVEN_CENTRAL_PASSWORD" diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 2b4e709cd3..2cab2e2e85 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -1642,4 +1642,4 @@ jobs: secrets: inherit with: - version-label: ${{ needs.check-cache.outputs.version-label }} + version-label: ${{ needs.check-cache.outputs.version-label }} \ No newline at end of file diff --git a/tools/gpg_with_pinentry.sh b/tools/gpg_with_pinentry.sh new file mode 100755 index 0000000000..ed1f38536c --- /dev/null +++ b/tools/gpg_with_pinentry.sh @@ -0,0 +1,2 @@ +gpg --pinentry-mode loopback "$@" + diff --git a/tools/publish_snapshots.main.kts b/tools/publish_snapshots.main.kts index 28ffafc496..dd06f8ab54 100644 --- a/tools/publish_snapshots.main.kts +++ b/tools/publish_snapshots.main.kts @@ -253,6 +253,8 @@ fun uploadFiles(files: PackageData) { add("-Dfiles=${files.additionalFiles.map { "${files.fullPathToPackage}/${it.fileName}" }.joinToString(",")}") add("-Dclassifiers=${files.additionalFiles.map { it.classifier }.joinToString(",")}") add("-Dtypes=${files.additionalFiles.map { it.type }.joinToString(",")}") + add("-Dgpg.executable=./gpg_with_pinentry.sh") // work around https://stackoverflow.com/questions/60417391 + } debug("Running command: ${args.joinToString(" ")}") runCommand(args, showOutput = true)