Skip to content

Commit

Permalink
2.0 release! Now on CleanroomMC's maven
Browse files Browse the repository at this point in the history
  • Loading branch information
Rongmario committed Feb 15, 2024
1 parent ce5e030 commit cd55639
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 1 deletion.
37 changes: 37 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Publish

on:
push:
tags:
- '[0-9]+.[0-9]+'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v3

- name: Grant Execute Permission for gradlew
run: chmod +x gradlew

- name: Setup Java
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'zulu'
cache: gradle

- name: Publish to Maven
uses: gradle/gradle-build-action@v2
with:
arguments: |
publish
-PCleanroomMaven=${{ vars.CLEANROOM_MAVEN }}
-PCleanroomMavenUsername=${{ secrets.MAVEN_NAME }}
-PCleanroomMavenPassword=${{ secrets.MAVEN_PASSWORD }}
- name: Upload Artifacts
uses: actions/upload-artifact@v3
with:
path: build/libs/
22 changes: 21 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
plugins {
id 'java'
id 'maven-publish'
id 'org.jetbrains.gradle.plugin.idea-ext' version '1.1.7'
}

group 'zone.rong'
version '1.3'
version '2.0'

tasks.withType(JavaExec).configureEach {
jvmArgs '--add-opens=java.base/jdk.internal.reflect=ALL-UNNAMED'
Expand Down Expand Up @@ -66,3 +67,22 @@ targetVendors.each { spec, info ->
}
}
}

publishing {
publications {
mavenJava(MavenPublication) {
from components.java
artifactId = 'imaginebreaker'
}
}
repositories {
maven {
name = 'CleanroomMaven'
url = CleanroomMaven
credentials(PasswordCredentials)
authentication {
basic(BasicAuthentication)
}
}
}
}

0 comments on commit cd55639

Please sign in to comment.