Skip to content

Commit

Permalink
changed publication for publishing two version: first version with in…
Browse files Browse the repository at this point in the history
…dex and second version snapshot
  • Loading branch information
polischuks committed Oct 26, 2024
1 parent 0832b37 commit e9b2fe0
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 5 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,14 @@ jobs:
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4

- name: Publish package
run: ./gradlew publish
- name: Publish stable version
run: ./gradlew publishStablePublicationToMavenRepository
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}

- name: Publish SNAPSHOT version
run: ./gradlew publishSnapshotPublicationToMavenRepository
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
16 changes: 13 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@ plugins {
}

group 'org.hyperskill'
version '12.0.0'
version '12.0.1'

sourceCompatibility = 21
java {
sourceCompatibility = JavaVersion.VERSION_21
targetCompatibility = JavaVersion.VERSION_21
}

repositories {
mavenCentral()
Expand Down Expand Up @@ -76,7 +79,14 @@ task createFatJar(type: Jar) {

publishing {
publications {
maven(MavenPublication) {
stable(MavenPublication) {
groupId = "com.github.hyperskill"
artifactId = "hs-test"
version = project.version
from components.java
}

snapshot(MavenPublication) {
groupId = "com.github.hyperskill"
artifactId = "hs-test"
version = "release-SNAPSHOT"
Expand Down

0 comments on commit e9b2fe0

Please sign in to comment.