Skip to content

Commit e6a46cb

Browse files
Setup for publishing a version manually in github (#8)
* Setup for publishing a version manually in github * only publish from main branch
1 parent 1d300f4 commit e6a46cb

File tree

3 files changed

+9
-25
lines changed

3 files changed

+9
-25
lines changed

.github/workflows/publish.yaml

Lines changed: 3 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
name: Publish to Maven Central
22

33
on:
4-
release:
5-
types:
6-
- published
4+
workflow_dispatch:
75

86
jobs:
97
publish:
8+
if: ${{ github.ref_name == 'main' }}
109
runs-on: ubuntu-latest
11-
env:
12-
GROUP_ID: dev.datastar.kotlin
13-
ARTIFACT_ID: kotlin-sdk
14-
10+
1511
steps:
1612
- uses: actions/checkout@v4
1713
- uses: actions/setup-java@v4
@@ -20,29 +16,17 @@ jobs:
2016
java-version: 21
2117
- uses: gradle/actions/setup-gradle@v4
2218

23-
- name: Set version from release
24-
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
25-
2619
- name: Package
2720
run: >
2821
./gradlew clean build -x check
29-
-PgroupId=${{ env.GROUP_ID }}
30-
-PartifactId=${{ env.ARTIFACT_ID }}
31-
-Pversion=${{ env.VERSION }}
3222
3323
- name: Stage Artifacts
3424
run: >
3525
./gradlew publish --no-configuration-cache
36-
-PgroupId=${{ env.GROUP_ID }}
37-
-PartifactId=${{ env.ARTIFACT_ID }}
38-
-Pversion=${{ env.VERSION }}
3926
4027
- name: Publish to Maven Central
4128
run: >
4229
./gradlew jreleaserDeploy --no-configuration-cache
43-
-PgroupId=${{ env.GROUP_ID }}
44-
-PartifactId=${{ env.ARTIFACT_ID }}
45-
-Pversion=${{ env.VERSION }}
4630
4731
env:
4832
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.MAVEN_USERNAME }}

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ The minimum JVM version compatible is **Java 21**.
1919

2020
```kotlin
2121
dependencies {
22-
implementation("dev.datastar.kotlin:kotlin-sdk:...")
22+
implementation("dev.datastar.kotlin:kotlin-sdk:1.0.0-RC1")
2323
}
2424
```
2525

@@ -30,7 +30,7 @@ dependencies {
3030
<dependency>
3131
<groupId>dev.datastar.kotlin</groupId>
3232
<artifactId>kotlin-sdk</artifactId>
33-
<version>...</version>
33+
<version>1.0.0-RC1</version>
3434
</dependency>
3535
```
3636

@@ -42,9 +42,9 @@ The following shows a simple implementation base of the Java `HttpServer`.
4242

4343
```kotlin
4444
// Depending on your context, you'll need to adapt the `Request` and `Response` interfaces, as well as implementation of the `JsonUnmarshaller` type.
45-
val jsonUnmarshaller: JsonUnmarshaller<YourType> = ...
46-
val request: Request = ...
47-
val response: Response = ...
45+
val jsonUnmarshaller: JsonUnmarshaller<YourType> = "... you implementation"
46+
val request: Request = "... you implementation"
47+
val response: Response = "... you implementation"
4848

4949
// The `readSignals` method extracts the signals from the request.
5050
// If you use a web framework, you likely don't need this since the framework probably already handles this in its own way.

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,4 @@ org.gradle.caching=true
44
datastar.test-suite.version=a7adbacbc9c1a3b27707d7cceba3c02a3f81a86c
55
groupId=dev.datastar.kotlin
66
artifactId=kotlin-sdk
7-
version=1.0.0-SNAPSHOT
7+
version=1.0.0-RC1

0 commit comments

Comments
 (0)