diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 981ea70..04c5acd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -13,6 +13,8 @@ jobs: with: java-version: 17 distribution: temurin + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 - name: Compile project run: | chmod +x gradlew diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..5a15566 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: Deployment + +on: + release: + types: + - created + +permissions: + contents: read + packages: write + +jobs: + publish: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: 17 + distribution: temurin + - name: Setup Gradle + uses: gradle/actions/setup-gradle@v4 + - name: Publish + run: ./gradlew publish -P version="${GITHUB_REF#refs/tags/}" + env: + GITHUB_USERNAME: ${{ secrets.GITHUB_ACTOR }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/build.gradle.kts b/build.gradle.kts index 307afa9..ef3e9be 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -32,9 +32,6 @@ allprojects{ sourceSets["main"].java.setSrcDirs(listOf(layout.projectDirectory.dir("src"))) - group = "com.github.GlennFolker.EntityAnno" - version = "v146.0.9" - repositories{ google() mavenCentral() @@ -80,6 +77,7 @@ allprojects{ } } + group = "com.github.GlennFolker.EntityAnno" publishing.repositories.maven{ url = uri("https://maven.pkg.github.com/GlennFolker/EntityAnno") credentials {