Skip to content

Commit

Permalink
Added GitHub Action to build and release
Browse files Browse the repository at this point in the history
  • Loading branch information
matthias-petri committed Apr 4, 2023
1 parent ec3d1ba commit da52e95
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: Deploy artifacts with Maven
on:
push:
branches: [main]
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-20.04
steps:
- name: Checks out code
uses: actions/checkout@v3

- name: Set up Java environment
uses: actions/setup-java@v3
with:
java-version: 11
distribution: zulu
cache: maven
gpg-private-key: ${{ secrets.MAVEN_CENTRAL_GPG_SIGNING_KEY_SEC }}
gpg-passphrase: MAVEN_CENTRAL_GPG_PASSPHRASE

- name: Deploy SNAPSHOT / Release
uses: camunda-community-hub/community-action-maven-release@v1
with:
release-version: ${{ github.event.release.tag_name }}
nexus-usr: ${{ secrets.NEXUS_USR }}
nexus-psw: ${{ secrets.NEXUS_PSW }}
maven-usr: ${{ secrets.MAVEN_CENTRAL_DEPLOYMENT_USR }}
maven-psw: ${{ secrets.MAVEN_CENTRAL_DEPLOYMENT_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 }}
id: release

- 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: ${{ steps.release.outputs.artifacts_archive_path }}
asset_content_type: application/zip

0 comments on commit da52e95

Please sign in to comment.