-
Notifications
You must be signed in to change notification settings - Fork 14
106 lines (106 loc) · 4.03 KB
/
main.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
name: Build, test and deploy artifacts with Maven
on:
workflow_dispatch: { }
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: Checkout
- name: Set up Go environment
uses: actions/setup-go@v5
with:
go-version: 1.21.5
- name: Set up Java environment
uses: actions/setup-java@v4
with:
java-version: '17'
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: Build Go Artefact
run: go build
working-directory: cawemo-to-web-modeler-migration
- name: Deploy SNAPSHOT / Release
uses: camunda-community-hub/community-action-maven-release@v1
with:
maven-additional-options: -P!autoFormat
release-version: ${{ github.event.release.tag_name }}
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 }}
id: release
- name: Push all diagram converter images
run: docker push -a -q ghcr.io/camunda-community-hub/camunda-7-to-8-migration/diagram-converter
- name: Push all process instance migrator images
run: docker push -a -q ghcr.io/camunda-community-hub/camunda-7-to-8-migration/process-instance-migration
- if: github.event.release
name: Attach Java 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: camunda-7-to-8-migration.zip
asset_content_type: application/zip
- if: github.event.release
name: Attach Go 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: cawemo-to-web-modeler-migration/cawemo-to-web-modeler-migration
asset_name: cawemo-to-web-modeler-migration
asset_content_type: application/octet-stream
- name: Publish Unit Test Results
id: publish
uses: EnricoMi/publish-unit-test-result-action@v2
if: always()
with:
files: '**/target/surefire-reports/*.xml'
# publish-modeler-plugin:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@master
# - name: Archive Plugin
# uses: thedoctor0/zip-release@master
# with:
# path: 'modeler-plugin-7-to-8-converter'
# type: 'zip'
# filename: 'modeler-plugin-7-to-8-converter.zip'
# exclusions: '*.git* /*node_modules/*'
# - if: github.event.release
# name: Upload Release
# uses: ncipollo/release-action@v1
# with:
# artifacts: "modeler-plugin-7-to-8-converter.zip"
# allowUpdates: true
# token: ${{ secrets.GITHUB_TOKEN }}