-
-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (50 loc) · 1.47 KB
/
publish.yaml
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
name: Publish and Release
permissions:
contents: write
on:
push:
tags:
- v[0-9]+.*
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
with:
java-version: '21'
distribution: 'temurin'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Publish package
run: mvn --batch-mode -Ppublish deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
- name: Upload binary
uses: actions/upload-artifact@v4
with:
name: cli
path: |
cli/target/cli.jar
retention-days: 1
- uses: actions/download-artifact@v4
with:
name: cli
- name: Rename files
run: |
mkdir release-files
mv cli.jar release-files/llm-agent-builder-cli.jar
- name: Create a Github Release
uses: ncipollo/release-action@v1
with:
token: "${{ secrets.GITHUB_TOKEN }}"
prerelease: false
body: ${{ github.ref_name }}
artifacts: "release-files/*"
generateReleaseNotes: true