Skip to content

Commit 281be9a

Browse files
committed
feat: generate release notes from template and update SCM tag to HEAD
1 parent 4c45669 commit 281be9a

3 files changed

Lines changed: 28 additions & 30 deletions

File tree

.github/workflows/notes.template

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Installation
2+
3+
📦 [View on Maven Central](https://central.sonatype.com/artifact/${GROUP_ID}/${ARTIFACT_ID}/${VERSION})
4+
5+
## Maven
6+
```xml
7+
<dependency>
8+
<groupId>${GROUP_ID}</groupId>
9+
<artifactId>${ARTIFACT_ID}</artifactId>
10+
<version>${VERSION}</version>
11+
</dependency>
12+
```
13+
14+
## Gradle (Kotlin DSL)
15+
```kotlin
16+
implementation("${GROUP_ID}:${ARTIFACT_ID}:${VERSION}")
17+
```
18+
19+
## Gradle (Groovy DSL)
20+
```groovy
21+
implementation '${GROUP_ID}:${ARTIFACT_ID}:${VERSION}'
22+
```

.github/workflows/publish-maven.yml

Lines changed: 4 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -149,38 +149,14 @@ jobs:
149149
GROUP_ID="io.github.copilot-community-sdk"
150150
ARTIFACT_ID="copilot-sdk"
151151
152-
RELEASE_NOTES=$(cat <<EOF
153-
# Installation
154-
155-
📦 [View on Maven Central](https://central.sonatype.com/artifact/${GROUP_ID}/${ARTIFACT_ID}/${VERSION})
156-
157-
## Maven
158-
\`\`\`xml
159-
<dependency>
160-
<groupId>${GROUP_ID}</groupId>
161-
<artifactId>${ARTIFACT_ID}</artifactId>
162-
<version>${VERSION}</version>
163-
</dependency>
164-
\`\`\`
165-
166-
## Gradle (Kotlin DSL)
167-
\`\`\`kotlin
168-
implementation("${GROUP_ID}:${ARTIFACT_ID}:${VERSION}")
169-
\`\`\`
170-
171-
## Gradle (Groovy DSL)
172-
\`\`\`groovy
173-
implementation '${GROUP_ID}:${ARTIFACT_ID}:${VERSION}'
174-
\`\`\`
175-
176-
EOF
177-
)
152+
# Generate release notes from template
153+
export VERSION GROUP_ID ARTIFACT_ID
154+
RELEASE_NOTES=$(envsubst < .github/workflows/notes.template)
178155
179156
gh release create "v${VERSION}" \
180157
${{ inputs.prerelease == true && '--prerelease' || '' }} \
181158
--title "Copilot Java SDK ${VERSION}" \
182159
--notes "${RELEASE_NOTES}" \
183-
--generate-notes \
184-
--target "v${VERSION}"
160+
--generate-notes
185161
env:
186162
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
<connection>scm:git:https://github.com/copilot-community-sdk/copilot-sdk-java.git</connection>
3434
<developerConnection>scm:git:https://github.com/copilot-community-sdk/copilot-sdk-java.git</developerConnection>
3535
<url>https://github.com/copilot-community-sdk/copilot-sdk-java</url>
36-
<tag>v1.0.1</tag>
37-
</scm>
36+
<tag>HEAD</tag>
37+
</scm>
3838

3939
<properties>
4040
<maven.compiler.release>17</maven.compiler.release>

0 commit comments

Comments
 (0)