-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
EDC extension - Maven Central publish
- Adds plugin configurations - Includes the LICENSE, NOTICE and DEPENDENCIES files in the jar - Defines required project properties for the EDC module - Adds Distribution management for both GitHub and OSSRH - Defines new workflow to publish artifact to Maven Central - Adds triggers to the existing release workflows - Defines release-to-central profile for release builds Updates #352 Signed-off-by: Istvan Zoltan Nagy <[email protected]>
- Loading branch information
1 parent
381da60
commit e21f8fe
Showing
5 changed files
with
243 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
################################################################################ | ||
# Copyright (c) 2024 Robert Bosch Manufacturing Solutions GmbH and others | ||
# Copyright (c) 2024 Contributors to the Eclipse Foundation | ||
# | ||
# See the NOTICE file(s) distributed with this work for additional | ||
# information regarding copyright ownership. | ||
# | ||
# This program and the accompanying materials are made available under the | ||
# terms of the Apache License, Version 2.0 which is available at | ||
# https://www.apache.org/licenses/LICENSE-2.0. | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT | ||
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the | ||
# License for the specific language governing permissions and limitations | ||
# under the License. | ||
# | ||
# SPDX-License-Identifier: Apache-2.0 | ||
################################################################################ | ||
|
||
--- | ||
|
||
name: Publish EDC extension to Maven Central | ||
|
||
on: | ||
workflow_dispatch: | ||
inputs: | ||
tag: | ||
type: string | ||
description: The name of the tag from which we would like to build an artifact | ||
required: true | ||
|
||
jobs: | ||
maven-release: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Checkout if workflow_dispatch | ||
if: ${{ github.event_name == 'workflow_dispatch' }} | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ inputs.tag }} | ||
- name: setup-java | ||
uses: actions/setup-java@v3 | ||
with: | ||
distribution: temurin | ||
java-version: 17 | ||
server-id: ossrh | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
- name: Setup Maven Action | ||
uses: s4u/[email protected] | ||
with: | ||
java-version: 17 | ||
- name: List Keys (set up GPG) | ||
shell: bash | ||
run: | | ||
gpg -K --keyid-format=long | ||
- name: Import GPG Private Key | ||
shell: bash | ||
run: | | ||
echo "use-agent" >> ~/.gnupg/gpg.conf | ||
echo "pinentry-mode loopback" >> ~/.gnupg/gpg.conf | ||
echo -e "${{ secrets.ORG_GPG_PRIVATE_KEY }}" | gpg --import --batch | ||
for fpr in $(gpg --list-keys --with-colons | awk -F: '/fpr:/ {print $10}' | sort -u); | ||
do | ||
echo -e "5\\ny\\n" | gpg --batch --command-fd 0 --expert --edit-key $fpr trust; | ||
done | ||
- name: Publish to the Maven Central Repository | ||
shell: bash | ||
run: | | ||
mvn clean verify nexus-staging:deploy -Dgpg.passphrase=${{ secrets.ORG_GPG_PASSPHRASE }} -f libraries/edc-extension/pom.xml -P release-to-central | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.ORG_OSSRH_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.ORG_OSSRH_PASSWORD }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters