Skip to content

Update pom.xml

Update pom.xml #335

Workflow file for this run

name: Build, test and deploy artifacts with Maven
on:
release:
types: [ published ]
push:
branches: [ main ]
jobs:
publish-maven:
runs-on: ubuntu-latest
permissions:
checks: write
pull-requests: write
packages: write
contents: write
steps:
- uses: actions/checkout@v4
- name: Set up Java environment
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
cache: maven
gpg-private-key: ${{ secrets.MAVEN_CENTRAL_GPG_SIGNING_KEY_SEC }}
gpg-passphrase: MAVEN_CENTRAL_GPG_PASSPHRASE
- name: Login to Docker Hub
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USR }}
password: ${{ secrets.DOCKERHUB_PSW }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy SNAPSHOT / Release
uses: camunda-community-hub/community-action-maven-release@v1
with:
maven-additional-options: -P!autoFormat -Pbuild-image
release-version: ${{ github.event.release.tag_name }}
nexus-usr: ${{ secrets.NEXUS_USR }}
nexus-psw: ${{ secrets.NEXUS_PSW }}
maven-usr: ${{ secrets.COMMUNITY_HUB_MAVEN_CENTRAL_S01_USR }}
maven-psw: ${{ secrets.COMMUNITY_HUB_MAVEN_CENTRAL_S01_PSW }}
maven-url: s01.oss.sonatype.org
maven-gpg-passphrase: ${{ secrets.MAVEN_CENTRAL_GPG_SIGNING_KEY_PASSPHRASE }}
maven-auto-release-after-close: true
github-token: ${{ secrets.GITHUB_TOKEN }}
id: release
- name: Build docker image
run: mvn clean package -DskipTests -Pbuild-image -B
- name: Push docker images
run: docker push -a -q ghcr.io/camunda-community-hub/script-connector/runtime
- if: github.event.release
name: Attach artifacts to GitHub Release (Release only)
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ steps.release.outputs.artifacts_archive_path }}
asset_name: script-connector.zip
asset_content_type: application/zip
- name: Publish Unit Test Results
id: publish
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: '**/target/surefire-reports/*.xml'