Skip to content

Commit a14850f

Browse files
committed
Publish to Maven Central
1 parent 71457c9 commit a14850f

8 files changed

Lines changed: 60 additions & 23 deletions

File tree

.github/dependabot.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ updates:
66
schedule:
77
interval: "weekly"
88
ignore:
9-
- dependency-name: "kotlin"
10-
versions: [ "2.x" ]
9+
- dependency-name: '*'
10+
update-types:
11+
- version-update:semver-major
1112
commit-message:
1213
prefix: "[deps]"

.github/workflows/build.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ on:
55
branches:
66
- master
77
paths:
8-
- ".github/**"
9-
- "src/**"
10-
- "build.gradle"
11-
- "gradle.properties"
8+
- .github/**
9+
- src/**
10+
- build.gradle
11+
- gradle.properties
1212
jobs:
1313
build:
1414
name: Build

.github/workflows/release.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,18 +13,29 @@ jobs:
1313
contents: write
1414
steps:
1515
- uses: actions/checkout@v4
16+
with:
17+
fetch-depth: 0
1618

1719
- uses: actions/setup-java@v4
1820
with:
1921
distribution: "corretto"
2022
java-version: "17"
2123
cache: "gradle"
2224

23-
- name: Publish artefacts
24-
run: ./gradlew publish
25+
- name: Build and publish
26+
run: ./gradlew clean assemble publish
27+
28+
- name: Release to Maven Central
29+
run: ./gradlew jreleaserDeploy
2530
env:
26-
GITHUB_USER: ${{ secrets.GITHUB_USER }}
27-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
JRELEASER_MAVENCENTRAL_USERNAME: ${{ secrets.MAVEN_USERNAME }}
32+
JRELEASER_MAVENCENTRAL_TOKEN: ${{ secrets.MAVEN_PASSWORD }}
33+
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
34+
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
35+
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
36+
JRELEASER_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2837

2938
- name: Create release
3039
uses: softprops/action-gh-release@v2
40+
with:
41+
generate_release_notes: true

.java-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
17

LICENSE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2024 Romanov Alexey
3+
Copyright (c) 2025 Romanov Alexey
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1-
[![Build project](https://github.com/Romanow/skip-method/actions/workflows/build.yml/badge.svg?branch=master)](https://github.com/Romanow/skip-method/actions/workflows/build.yml)
2-
[![codecov](https://codecov.io/github/Romanow/skip-method/branch/master/graph/badge.svg?token=RXVXL3NUNS)](https://codecov.io/github/Romanow/skip-method)
1+
[![CI](https://github.com/Romanow/skip-method/actions/workflows/build.yml/badge.svg)](https://github.com/Romanow/skip-method/actions/workflows/build.yml)
32
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit)](https://github.com/pre-commit/pre-commit)
3+
[![Release](https://img.shields.io/github/v/release/Romanow/skip-method?logo=github&sort=semver)](https://github.com/Romanow/skip-method/releases/latest)
4+
[![Codecov](https://codecov.io/gh/Romanow/skip-method/branch/master/graph/badge.svg?token=Cckw6pHLh7)](https://codecov.io/gh/Romanow/skip-method)
5+
[![License](https://img.shields.io/github/license/Romanow/skip-method)](https://github.com/Romanow/skip-method/blob/master/LICENSE)
46

57
# Пропуск вызова метода в тестах
68

@@ -15,7 +17,7 @@
1517

1618
```xml
1719
<dependency>
18-
<groupId>ru.romanow.skip.method</groupId>
20+
<groupId>ru.romanow-alex</groupId>
1921
<artifactId>skip-method</artifactId>
2022
<version>${skip-method.version}</version>
2123
</dependency>
@@ -24,7 +26,7 @@
2426
### Gradle
2527

2628
```groovy
27-
testImplementation "ru.romanow.skip.method:skip-method:$skipMethodVersion"
29+
testImplementation "ru.romanow-alex:skip-method:$skipMethodVersion"
2830
```
2931

3032

build.gradle

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ plugins {
22
id "idea"
33
id "jacoco"
44
id "maven-publish"
5-
id "org.jetbrains.kotlin.jvm" version "1.9.22"
5+
id "org.jetbrains.kotlin.jvm" version "1.9.25"
66
id "org.jlleitschuh.gradle.ktlint" version "12.1.1"
77
}
88

@@ -51,6 +51,10 @@ test {
5151
useJUnitPlatform()
5252
systemProperty "skipOn", findProperty("skipOn")
5353

54+
testLogging {
55+
showStandardStreams = true
56+
}
57+
5458
doFirst {
5559
jvmArgs "--add-opens",
5660
"java.base/java.lang=ALL-UNNAMED",
@@ -74,6 +78,7 @@ publishing {
7478
pom {
7579
name = "skip-method"
7680
description = "Skip method in test"
81+
url = "https://github.com/Romanow/skip-method/"
7782
licenses {
7883
license {
7984
name = "The MIT License"
@@ -82,22 +87,39 @@ publishing {
8287
}
8388
developers {
8489
developer {
85-
name = "Romanov Alex"
86-
email = "romanowalex@mail.ru"
90+
id = "Romanow"
91+
name = "Romanov Alexey"
92+
email = "romanow.tech@gmail.com"
8793
}
8894
}
8995
scm {
9096
url = "https://github.com/Romanow/skip-method/"
97+
connection = "scm:git:https://github.com/Romanow/skip-method.git"
98+
developerConnection = "scm:git:ssh://github.com/Romanow/skip-method.git"
9199
}
92100
}
93101
}
94102
}
95103
repositories {
96104
maven {
97-
url = uri("https://maven.pkg.github.com/Romanow/skip-method")
98-
credentials {
99-
username = System.getenv("GITHUB_USER")
100-
password = System.getenv("GITHUB_TOKEN")
105+
url = "build/staging-deploy"
106+
}
107+
}
108+
}
109+
110+
jreleaser {
111+
signing {
112+
active = "ALWAYS"
113+
armored = true
114+
}
115+
deploy {
116+
maven {
117+
mavenCentral {
118+
sonatype {
119+
active = "ALWAYS"
120+
url = "https://central.sonatype.com/api/v1/publisher"
121+
stagingRepository("build/staging-deploy")
122+
}
101123
}
102124
}
103125
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
version=1.0.0
2-
group=ru.romanow.skip.method
2+
group=ru.romanow-alex
33
org.gradle.daemon=true

0 commit comments

Comments
 (0)