-
Notifications
You must be signed in to change notification settings - Fork 167
53 lines (50 loc) · 1.69 KB
/
publish_maven_central_warehouse.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
on:
workflow_dispatch:
inputs:
version:
description: 'Version number to be released this time'
required: true
name: publish
env:
version: ${{ inputs.version }}
jobs:
publish:
name: publish Maven central warehouse
runs-on: ubuntu-latest
steps:
- name: Checkout Source # 检出代码
uses: actions/checkout@v3
- name: Set up JDK 8 # 构建jdk运行环境
uses: actions/setup-java@v3
with:
java-version: '8'
distribution: 'adopt'
cache: maven
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: set version
run: |
mvn versions:set -DnewVersion='${{ env.version }}'
- name: Install secret key
run: |
cat <(echo -e "${{ secrets.GPG_PRIVATE_KEY }}") | gpg --batch --import
gpg --list-secret-keys --keyid-format LONG
- name: publish agentCore
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: |
cd ${{ github.workspace }}/sermant-agentcore
mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_SECRET_KEY_PASSWORD }} clean deploy -P release -DskipTests
- name: install
run: |
cd ${{ github.workspace }}
mvn clean install -DskipTests
- name: publish plugin
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
run: |
cd ${{ github.workspace }}
mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_SECRET_KEY_PASSWORD }} clean deploy -P release -DskipTests