-
-
Notifications
You must be signed in to change notification settings - Fork 31
71 lines (61 loc) · 1.9 KB
/
manual-deploy.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
name: Manual maven deployment
on:
workflow_dispatch:
inputs:
tag:
description: 'The tag to deploy'
required: true
jobs:
manual_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag }}
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'adopt'
java-version: '17'
cache: 'maven'
server-username: SONATYPE_USERNAME
server-password: SONATYPE_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Retrieve the new version
id: get-version
uses: JActions/[email protected]
- name: Publish to Apache Maven Central
run: mvn clean -DskipTests deploy --settings .settings.xml -P release,ossrh
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Upload jars file
uses: actions/[email protected]
with:
name: jars
path: ./target/**/*.jar
retention-days: 5
manual_release:
needs: manual_deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ github.event.inputs.tag }}
- name: Download artifacts
uses: actions/[email protected]
with:
name: jars
- name: Retrieve the version
id: get-version
uses: JActions/[email protected]
- name: Create the release
uses: marvinpinto/action-automatic-releases@latest
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: ${{ github.event.inputs.tag }}
prerelease: false
files: |
*.jar