generated from camunda-community-hub/zeebe-worker-java-template
-
Notifications
You must be signed in to change notification settings - Fork 4
58 lines (52 loc) · 1.96 KB
/
mvn-release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Deploy artifacts with Maven
on:
push:
branches: [main]
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: mvn-release Checkout
uses: actions/checkout@v3
- name: Cache
uses: actions/cache@v2
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@v1
with:
java-version: 17
gpg-private-key: ${{ secrets.MAVEN_CENTRAL_GPG_SIGNING_KEY_SEC }}
gpg-passphrase: MAVEN_CENTRAL_GPG_PASSPHRASE
- name: Set up NPM
uses: actions/setup-node@v3
- name: Build with Maven
run: CI=false mvn --batch-mode --update-snapshots package
- name: Deploy SNAPSHOT / Release
uses: camunda-community-hub/community-action-maven-release@main
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-gpg-passphrase: ${{ secrets.MAVEN_CENTRAL_GPG_SIGNING_KEY_PASSPHRASE }}
github-token: ${{ secrets.GITHUB_TOKEN }}
maven-auto-release-after-close: true
maven-url: s01.oss.sonatype.org
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