Skip to content

Commit 6d2ddf2

Browse files
committed
fix(ci): deploy to another repository
1 parent 257a682 commit 6d2ddf2

File tree

3 files changed

+20
-22
lines changed

3 files changed

+20
-22
lines changed

.github/workflows/build.yaml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,6 @@ name: Build
22

33
on: [ push ]
44

5-
env:
6-
GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }}
7-
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
8-
GPG_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }}
9-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_OSSRH_DEPLOYER }}
10-
SONATYPE_TOKEN: ${{ secrets.SONATYPE_OSSRH_TOKEN }}
11-
125
jobs:
136
build:
147
runs-on: ubuntu-latest
@@ -26,11 +19,12 @@ jobs:
2619
- name: Build with Gradle
2720
run: ./gradlew test build --no-daemon
2821

29-
- name: Publish to Sonatype
22+
- name: Publish with Gradle
3023
if: github.ref == 'refs/heads/master'
3124
env:
3225
GPG_PASSPHRASE: ${{ secrets.GPG_KEY_PASSPHRASE }}
3326
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }}
34-
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
35-
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_PASSWORD }}
27+
USERNAME: ${{ secrets.REPO_USER }}
28+
TOKEN: ${{ secrets.REPO_TOKEN }}
29+
3630
run: ./gradlew publish --no-daemon

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
<p align="center">
88
<a target="_blank"><img src="https://github.com/CatCoderr/ProtocolSidebar/actions/workflows/build.yaml/badge.svg" alt="Build" /></a>
99
<a target="_blank"><img src="https://img.shields.io/github/license/CatCoderr/ProtocolSidebar" alt="License" /></a>
10-
<a target="_blank"><img src="https://img.shields.io/nexus/s/me.catcoder/bukkit-sidebar?server=https%3A%2F%2Foss.sonatype.org" alt="Nexus" /></a>
1110
<a target="_blank"><img src="https://img.shields.io/badge/Minecraft%20Versions-1.12.2--1.21-blue?style=flat" alt="Minecraft Versions" /></a>
1211
</p>
1312

@@ -24,6 +23,10 @@
2423

2524
![Sidebar](https://github.com/CatCoderr/ProtocolSidebar/raw/master/assets/sidebar.gif)
2625

26+
⚠️ **Note**: starting from **6.2.7-SNAPSHOT** version, the repository has been moved to https://catcoder.pl.ua/snapshots.
27+
You can find URL for Maven and Gradle in the [Adding to your project](#adding-to-your-project) section.
28+
29+
2730
## Donations
2831
[![Buy Me a Coffee](https://img.shields.io/badge/Buy%20Me%20a%20Coffee-Donate%20Now-yellow?style=for-the-badge&logo=buy-me-a-coffee)](https://www.buymeacoffee.com/catcoderr)
2932

@@ -58,8 +61,8 @@ or [maven-shade-plugin](https://maven.apache.org/plugins/maven-shade-plugin/) (f
5861

5962
```xml
6063
<repository>
61-
<id>sonatype-snapshots</id>
62-
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
64+
<id>catcoder-snapshots</id>
65+
<url>https://catcoder.pl.ua/snapshots</url>
6366
</repository>
6467
```
6568
```xml
@@ -74,7 +77,7 @@ or [maven-shade-plugin](https://maven.apache.org/plugins/maven-shade-plugin/) (f
7477

7578
```groovy
7679
repositories {
77-
maven { url 'https://oss.sonatype.org/content/repositories/snapshots/' }
80+
maven { url 'https://catcoder.pl.ua/snapshots' }
7881
}
7982
```
8083
```groovy
@@ -87,7 +90,7 @@ dependencies {
8790

8891
```kotlin
8992
repositories {
90-
maven("https://oss.sonatype.org/content/repositories/snapshots/")
93+
maven("https://catcoder.pl.ua/snapshots")
9194
}
9295
```
9396
```kotlin

build.gradle.kts

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,13 @@
11
plugins {
22
id("java-library")
33
id("maven-publish")
4-
id("io.github.gradle-nexus.publish-plugin") version "1.3.0"
54
id("signing")
65
}
76

87
group = "me.catcoder"
98
version = "6.2.7-SNAPSHOT"
109
description = "Powerful feature-packed Minecraft scoreboard library"
1110

12-
extra["sonatypeUsername"] = System.getenv("SONATYPE_USERNAME")
13-
extra["sonatypePassword"] = System.getenv("SONATYPE_PASSWORD")
14-
1511
val adventureVersion = "4.16.0"
1612
val paperVersion = "1.20.1-R0.1-SNAPSHOT"
1713
val viaVersionVersion = "4.8.1"
@@ -105,11 +101,16 @@ publishing {
105101
}
106102
}
107103
}
108-
}
109104

110-
nexusPublishing {
111105
repositories {
112-
sonatype()
106+
maven {
107+
name = "Snapshots"
108+
url = uri("https://catcoder.pl.ua/snapshots")
109+
credentials {
110+
username = System.getenv("USERNAME")
111+
password = System.getenv("TOKEN")
112+
}
113+
}
113114
}
114115
}
115116

0 commit comments

Comments
 (0)