-
Notifications
You must be signed in to change notification settings - Fork 202
Expand file tree
/
Copy pathci-task-3-release-to-maven-central.yml
More file actions
50 lines (43 loc) · 1.47 KB
/
Copy pathci-task-3-release-to-maven-central.yml
File metadata and controls
50 lines (43 loc) · 1.47 KB
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
name: Task/Batch 3 Apps (Release to Maven Central)
on:
workflow_dispatch:
inputs:
buildName:
description: "Artifactory build name"
required: true
buildNumber:
description: "Artifactory build number"
required: true
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
JF_ENV_SPRING: ${{ secrets.JF_ARTIFACTORY_SPRING }}
CENTRAL_TOKEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
jobs:
deploy-to-maven-central:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
show-progress: false
- name: Verify Maven Secrets
run: |
if [[ -z $CENTRAL_TOKEN_USERNAME ]]
then
gh run cancel ${{ github.run_id }}
echo "::error title=Cannot deploy to Maven Central:: The 'CENTRAL_TOKEN_USERNAME' & 'CENTRAL_TOKEN_PASSWORD' must be provided"
exit 1
fi
- uses: jfrog/setup-jfrog-cli@v4
- name: Download Release Files
run: |
jfrog rt download \
--spec '.github/artifactory-release-files-spec.json' \
--spec-vars "buildname=${{ inputs.buildName }};buildnumber=${{ inputs.buildNumber }}"
- name: Deploy to Maven Central
if: env.CENTRAL_TOKEN_USERNAME
uses: spring-io/central-publish-action@v0.3.0
with:
token-name: ${{ secrets.CENTRAL_TOKEN_USERNAME }}
token: ${{ secrets.CENTRAL_TOKEN_PASSWORD }}
dir: central_bundle
timeout: 2h