Repository navigation
61 lines (54 loc) · 2.32 KB
/
Copy pathrelease.yml
File metadata and controls
61 lines (54 loc) · 2.32 KB
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
name: Release
on:
push:
tags: ["v*"]
permissions:
contents: write
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with: { distribution: temurin, java-version: 17 }
- uses: gradle/actions/setup-gradle@v4
- name: Build and test before publishing
run: gradle build --no-daemon
- name: "Publish to Maven Central (validated, then published automatically)"
env:
CENTRAL_USERNAME: ${{ secrets.CENTRAL_USERNAME }}
CENTRAL_PASSWORD: ${{ secrets.CENTRAL_PASSWORD }}
SIGNING_KEY: ${{ secrets.SIGNING_KEY }}
SIGNING_PASSWORD: ${{ secrets.SIGNING_PASSWORD }}
run: |
VERSION="${GITHUB_REF_NAME#v}"
gradle -PlayaVersion="$VERSION" nmcpPublishAggregationToCentralPortal --no-daemon
- name: Create the GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION="${GITHUB_REF_NAME#v}"
PRE=""
if [[ "$VERSION" == *-* ]]; then PRE="--prerelease"; fi
cat > notes.md <<EOF
## laya-java ${VERSION}
Run [Laya](https://github.com/NandhaKishorM/laya) typed-decision models (yes/no, choice, score) in **pure Java**, with OpenAI Decisions API and Jev compatible endpoints. No Python, no PyTorch.
### Install
**Gradle (Kotlin DSL)**
\`\`\`kotlin
implementation(platform("io.github.apscot:laya-bom:${VERSION}"))
implementation("io.github.apscot:laya-core")
\`\`\`
**Maven**
\`\`\`xml
<dependency>
<groupId>io.github.apscot</groupId>
<artifactId>laya-core</artifactId>
<version>${VERSION}</version>
</dependency>
\`\`\`
Artifacts on [Maven Central](https://central.sonatype.com/namespace/io.github.apscot): \`laya-core\`, \`laya-accelerate\`, \`laya-api\`, \`laya-client\`, \`laya-spring-boot-starter\`, \`laya-gradle-plugin\`, \`laya-bom\`.
Snippets for every artifact, usage examples and limitations are in the [README](https://github.com/${GITHUB_REPOSITORY}#readme).
### What's changed
EOF
gh release create "$GITHUB_REF_NAME" $PRE --title "laya-java ${VERSION}" --notes-file notes.md --generate-notes