Skip to content

Commit

Permalink
ci: publish snapshots to maven repo
Browse files Browse the repository at this point in the history
  • Loading branch information
darksaid98 committed May 28, 2024
1 parent f629b72 commit e411b16
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:

# Build with Gradle & Publish to Maven repository
- name: Build with Gradle
run: ./gradlew clean build publish -PcustomVersion=${{ steps.version.outputs.version }}
run: ./gradlew clean build publishAllPublicationsToReleasesRepository -PcustomVersion=${{ steps.version.outputs.version }}
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_NAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_SECRET }}
Expand Down
13 changes: 4 additions & 9 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,7 @@ jobs:

# Build with Gradle
- name: Build with Gradle
run: ./gradlew clean build -PcustomVersion=${{ steps.version.outputs.version }}-SNAPSHOT-${{ github.run_number }} --info

# Upload build results
- name: Upload build results
uses: actions/upload-artifact@v4
with:
name: Build ${{ steps.version.outputs.version-with-prefix }}-SNAPSHOT-${{ github.run_number }}
path: ${{ github.workspace }}/build/libs/
retention-days: 3
run: ./gradlew clean build publishAllPublicationsToSnapshotsRepository -PcustomVersion=${{ steps.version.outputs.version }}-SNAPSHOT-${{ github.run_number }} --info
env:
MAVEN_USERNAME: ${{ secrets.MAVEN_NAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_SECRET }}
10 changes: 9 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,20 @@ publishing {

repositories {
maven {
name = "milkdrinkers"
name = "releases"
url = uri("https://maven.athyrium.eu/releases")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
maven {
name = "snapshots"
url = uri("https://maven.athyrium.eu/snapshots")
credentials {
username = System.getenv("MAVEN_USERNAME")
password = System.getenv("MAVEN_PASSWORD")
}
}
}
}

0 comments on commit e411b16

Please sign in to comment.