Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[tractusx-dev] Publish to Sonatype/MavenCentral from GH Actions
  • From: Paul Latzelsperger <paul.latzelsperger@xxxxxxxxxxxxx>
  • Date: Fri, 30 Jun 2023 11:20:09 +0000
  • Accept-language: en-US
  • Arc-authentication-results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=beardyinc.com; dmarc=pass action=none header.from=beardyinc.com; dkim=pass header.d=beardyinc.com; arc=none
  • Arc-message-signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=V74q1fBDKVr+sJZFyYURDFLQHQDZhBcUN47rgkx0FZI=; b=Ewe4zzfqHdanzi8JaR9Y8fHzu1Im9CeUR7XXpfMA9PstCqZH+dFMZJc98aoAzJSGw8nacZePj2hVBahc2wmGNplHo6rzaOUe8z74rxBAVgIYoZNukDlz8Jdy6nAdVugR7+AVcKsyfXkpDGSoaANu8G3vi57vbKtzCwF4/0+2J6f3dNwwcgxYaYZ8WbkoOD6VXY7y8PTtLf0XyUEk04A5hxW2eRWl0CZZbcdtDIseKJBh3TWT7hag8GoKaliw7Lpr0Lb/1D1HeRVjj6+VxFFCK7sB5kcTJafzf+TyKFgi59s6XdnZruvl//TEvFnU6sPFBvALS0APTq0xkGXuZMYnKg==
  • Arc-seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=bIuxVJDhrv6KJ+Sfai8MBPMa7NQ6IGItgJGfetNmCPIS8VdQlQH3veJ7iXL92yYA/w6vlx09G61pfLILmWhpzNVK6WJdOR142dJIEaLSzWIlJSuNQNupOLhb/zvEmwhnOvbP8RdOHTNL6rniNn5zG9HsjrBVTqJ68VrCxPjL9EBC9Mr6wtMeEEXqrt1284NRWWbehfgyx1ug8n81nwY9fKgip//d02D0RZHNx2BdbuxxurFQIFsf7MSTn/7URmnkQI72uQFBFLxoVYtMcB5ii7/hFJeXK7Ay1xFGJwBGBJz4G20ZbJ8R0TXr+CsEyy8kCtEpdY0iockuqPLcMpEOhQ==
  • Delivered-to: tractusx-dev@xxxxxxxxxxx
  • List-archive: <https://www.eclipse.org/mailman/private/tractusx-dev/>
  • List-help: <mailto:tractusx-dev-request@eclipse.org?subject=help>
  • List-subscribe: <https://www.eclipse.org/mailman/listinfo/tractusx-dev>, <mailto:tractusx-dev-request@eclipse.org?subject=subscribe>
  • List-unsubscribe: <https://www.eclipse.org/mailman/options/tractusx-dev>, <mailto:tractusx-dev-request@eclipse.org?subject=unsubscribe>
  • Thread-index: AQHZq0TUWwJvZ1AWpUOOpR7CNorKNQ==
  • Thread-topic: Publish to Sonatype/MavenCentral from GH Actions

Hey all

As promised, there’s a quick intro to how we (tractus-x EDC) publish to Sonatype Snapshots and Maven Central directly from GH Actions:


The repo (or org?) must have MFA enabled. The GPG Key and the OSSRH Credentials are present as Org Secrets, so your project should have them readily available already. 

Internally we use a composite GH action to import the GPG Key, which you can find here: https://github.com/eclipse-tractusx/tractusx-edc/blob/main/.github/actions/import-gpg-key/action.yml

Please also note that the “OSSRH_PASSWORD” and “OSSRH_USER” are used by our Gradle build to authenticate against OSSRH repositories. OSSRH will automatically push to its Snapshot repository, if the version has the `-SNAPSHOT` postfix, although that might be Maven/Gradle specific.

FYI we’re a Java project using Gradle, and for publishing we are using the Nexus Publishing Plugin.


If you have questions, don’t hesitate to get in touch.

Best
Paul

Back to the top