-
Notifications
You must be signed in to change notification settings - Fork 883
76 lines (67 loc) · 4.05 KB
/
maven-central-release.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
name: Maven Central Release
on:
workflow_dispatch:
inputs:
releaseVersion:
description: "Release version"
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Capture release version
run: echo RELEASE_VERSION=${{ github.event.inputs.releaseVersion }} >> $GITHUB_ENV
- name: Prepare directory structure
run: |
mkdir -p nexus/org/springframework/ai/spring-ai-core/$RELEASE_VERSION
mkdir -p nexus/org/springframework/ai/spring-ai-openai/$RELEASE_VERSION
mkdir -p nexus/org/springframework/ai/spring-ai-azure-openai/$RELEASE_VERSION
mkdir -p nexus/org/springframework/ai/spring-ai-spring-boot-autoconfigure/$RELEASE_VERSION
- name: Download release files from Artifactory
env:
ARTIFACTORY_URL: "https://repo.spring.io/libs-staging-local/org/springframework/ai"
run: |
echo "Downloading core artifacts"
cd ../../../../../..
cd nexus/org/springframework/ai/spring-ai-core/$RELEASE_VERSION
wget $ARTIFACTORY_URL/spring-ai-core/$RELEASE_VERSION/spring-ai-core-$RELEASE_VERSION.pom
wget $ARTIFACTORY_URL/spring-ai-core/$RELEASE_VERSION/spring-ai-core-$RELEASE_VERSION.jar
wget $ARTIFACTORY_URL/spring-ai-core/$RELEASE_VERSION/spring-ai-core-$RELEASE_VERSION-javadoc.jar
wget $ARTIFACTORY_URL/spring-ai-core/$RELEASE_VERSION/spring-ai-core-$RELEASE_VERSION-sources.jar
echo "Downloading openai artifacts"
cd ../../../../../..
cd nexus/org/springframework/batch/spring-ai-openai/$RELEASE_VERSION
wget $ARTIFACTORY_URL/spring-ai-openai/$RELEASE_VERSION/spring-ai-openai-$RELEASE_VERSION.pom
wget $ARTIFACTORY_URL/spring-ai-openai/$RELEASE_VERSION/spring-ai-openai-$RELEASE_VERSION.jar
wget $ARTIFACTORY_URL/spring-ai-openai/$RELEASE_VERSION/spring-ai-openai-$RELEASE_VERSION-javadoc.jar
wget $ARTIFACTORY_URL/spring-ai-openai/$RELEASE_VERSION/spring-ai-openai-$RELEASE_VERSION-sources.jar
echo "Downloading azure openai artifacts"
cd ../../../../../..
cd nexus/org/springframework/batch/spring-ai-azure-openai/$RELEASE_VERSION
wget $ARTIFACTORY_URL/spring-ai-azure-openai/$RELEASE_VERSION/spring-ai-azure-openai-$RELEASE_VERSION.pom
wget $ARTIFACTORY_URL/spring-ai-azure-openai/$RELEASE_VERSION/spring-ai-azure-openai-$RELEASE_VERSION.jar
wget $ARTIFACTORY_URL/spring-ai-azure-openai/$RELEASE_VERSION/spring-ai-azure-openai-$RELEASE_VERSION-javadoc.jar
wget $ARTIFACTORY_URL/spring-ai-azure-openai/$RELEASE_VERSION/spring-ai-azure-openai-$RELEASE_VERSION-sources.jar
echo "Downloading autoconfiguration artifacts"
cd ../../../../../..
cd nexus/org/springframework/batch/spring-ai-spring-boot-autoconfigure/$RELEASE_VERSION
wget $ARTIFACTORY_URL/spring-ai-spring-boot-autoconfigure/$RELEASE_VERSION/spring-ai-spring-boot-autoconfigure-$RELEASE_VERSION.pom
wget $ARTIFACTORY_URL/spring-ai-spring-boot-autoconfigure/$RELEASE_VERSION/spring-ai-spring-boot-autoconfigure-$RELEASE_VERSION.jar
wget $ARTIFACTORY_URL/spring-ai-spring-boot-autoconfigure/$RELEASE_VERSION/spring-ai-spring-boot-autoconfigure-$RELEASE_VERSION-javadoc.jar
wget $ARTIFACTORY_URL/spring-ai-spring-boot-autoconfigure/$RELEASE_VERSION/spring-ai-spring-boot-autoconfigure-$RELEASE_VERSION-sources.jar
- name: Sign artifacts and release them to Maven Central
uses: jvalkeal/nexus-sync@v0
id: nexus
with:
url: ${{ secrets.OSSRH_URL }}
username: ${{ secrets.OSSRH_S01_TOKEN_USERNAME }}
password: ${{ secrets.OSSRH_S01_TOKEN_PASSWORD }}
staging-profile-name: ${{ secrets.OSSRH_STAGING_PROFILE_NAME }}
create: true
upload: true
close: true
release: true
generate-checksums: true
pgp-sign: true
pgp-sign-passphrase: ${{ secrets.GPG_PASSPHRASE }}
pgp-sign-private-key: ${{ secrets.GPG_PRIVATE_KEY }}