Skip to content

Commit 8afe1eb

Browse files
authored
Test release automation (#93)
1 parent df22d30 commit 8afe1eb

File tree

2 files changed

+9
-5
lines changed

2 files changed

+9
-5
lines changed

.github/workflows/release.yaml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@ on:
1212
description: "Beta release version (e.g., 1.8.0-beta15)"
1313
required: true
1414

15+
env:
16+
STABLE_VERSION: ${{ github.event.inputs.stableVersion || github.event.client_payload.stableVersion }}
17+
BETA_VERSION: ${{ github.event.inputs.betaVersion || github.event.client_payload.betaVersion }}
18+
1519
jobs:
1620

1721
release:
@@ -42,10 +46,10 @@ jobs:
4246
echo "stableVersionSnapshot=$REVISION" >> $GITHUB_OUTPUT
4347
4448
- name: Update stable versions
45-
run: mvn versions:set -DnewVersion=${{ github.event.inputs.stableVersion }} -DoldVersion=${{ steps.extract-stable-snapshot-version.outputs.stableVersionSnapshot }} -DgroupId=* -DartifactId=* -DgenerateBackupPoms=false
49+
run: mvn versions:set -DnewVersion=${{ env.STABLE_VERSION }} -DoldVersion=${{ steps.extract-stable-snapshot-version.outputs.stableVersionSnapshot }} -DgroupId=* -DartifactId=* -DgenerateBackupPoms=false
4650

4751
- name: Update stable version property
48-
run: mvn versions:set-property -Dproperty=langchain4j.stable.version -DnewVersion=${{ github.event.inputs.stableVersion }}
52+
run: mvn versions:set-property -Dproperty=langchain4j.stable.version -DnewVersion=${{ env.STABLE_VERSION }}
4953

5054
- name: Extract current beta SNAPSHOT version from POM property
5155
id: extract-beta-snapshot-version
@@ -54,10 +58,10 @@ jobs:
5458
echo "betaVersionSnapshot=$REVISION" >> $GITHUB_OUTPUT
5559
5660
- name: Update beta versions
57-
run: mvn versions:set -DnewVersion=${{ github.event.inputs.betaVersion }} -DoldVersion=${{ steps.extract-beta-snapshot-version.outputs.betaVersionSnapshot }} -DgroupId=* -DartifactId=* -DgenerateBackupPoms=false
61+
run: mvn versions:set -DnewVersion=${{ env.BETA_VERSION }} -DoldVersion=${{ steps.extract-beta-snapshot-version.outputs.betaVersionSnapshot }} -DgroupId=* -DartifactId=* -DgenerateBackupPoms=false
5862

5963
- name: Update beta version property
60-
run: mvn versions:set-property -Dproperty=langchain4j.beta.version -DnewVersion=${{ github.event.inputs.betaVersion }}
64+
run: mvn versions:set-property -Dproperty=langchain4j.beta.version -DnewVersion=${{ env.BETA_VERSION }}
6165

6266
- name: release_part_1 # Maven Central allows uploading archive up to 1GB, so we need to split release in 2 parts
6367
run: |

pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@
8484
<extensions>true</extensions>
8585
<configuration>
8686
<publishingServerId>central</publishingServerId>
87-
<autoPublish>false</autoPublish>
87+
<autoPublish>true</autoPublish>
8888
</configuration>
8989
</plugin>
9090

0 commit comments

Comments
 (0)