Merge pull request #600 from camunda-community-hub/renovate/com.githu… #406
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
name: Deploy artifacts with Maven | |
on: | |
push: | |
branches: [master] | |
release: | |
types: [published] | |
jobs: | |
publish: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Cache | |
uses: actions/cache@v4 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Set up Java environment | |
uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: 11 | |
gpg-private-key: ${{ secrets.MAVEN_CENTRAL_GPG_SIGNING_KEY_SEC }} | |
gpg-passphrase: MAVEN_CENTRAL_GPG_PASSPHRASE | |
- name: Run Maven | |
run: ./mvnw -B clean install license:check-file-header | |
- name: Deploy SNAPSHOT / Release | |
id: release | |
uses: camunda-community-hub/[email protected] | |
with: | |
maven-release-options: -DskipExamples # avoid publication of examples into public repositories | |
release-version: ${{ github.event.release.tag_name }} | |
release-profile: community-action-maven-release | |
central-release-profile: oss-maven-central | |
nexus-usr: ${{ secrets.NEXUS_USR }} | |
nexus-psw: ${{ secrets.NEXUS_PSW }} | |
maven-usr: ${{ secrets.COMMUNITY_HUB_MAVEN_CENTRAL_OSS_USR }} | |
maven-psw: ${{ secrets.COMMUNITY_HUB_MAVEN_CENTRAL_OSS_PSW }} | |
maven-url: oss.sonatype.org | |
maven-gpg-passphrase: ${{ secrets.MAVEN_CENTRAL_GPG_SIGNING_KEY_PASSPHRASE }} | |
maven-auto-release-after-close: true | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Attach artifacts to GitHub Release (Release only) | |
if: github.event.release | |
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: ${{ steps.release.outputs.artifacts_archive_path }} | |
asset_content_type: application/zip |