Skip to content

Commit 330d078

Browse files
committed
build: temporarily use personal GitHub Package Registry as a Maven repository
1 parent 66ce68d commit 330d078

File tree

3 files changed

+51
-10
lines changed

3 files changed

+51
-10
lines changed

.github-actions/maven/settings.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
4+
<servers>
5+
<server>
6+
<id>github-package-registry</id>
7+
<username>JarvisCraft</username>
8+
<password>${env.GITHUB_TOKEN}</password>
9+
</server>
10+
</servers>
11+
</settings>

.github/workflows/deploy.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: Deploy
2+
3+
on: [ push, workflow_dispatch ]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
13+
- name: Set up JDK 1.8
14+
uses: actions/setup-java@v1
15+
with:
16+
java-version: 1.8
17+
18+
- name: Cache Maven packages
19+
uses: actions/cache@v2
20+
with:
21+
path: ~/.m2
22+
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
23+
restore-keys: ${{ runner.os }}-m2
24+
25+
- name: Deploy
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
run: mvn -B -f ./PacketWrapper/pom.xml deploy -s ./.github-actions/maven/settings.xml
29+
30+
- name: Upload artifacts
31+
uses: actions/upload-artifact@v2
32+
with:
33+
name: plugin
34+
path: PacketWrapper/target/PacketWrapper.jar

PacketWrapper/pom.xml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
44
<modelVersion>4.0.0</modelVersion>
5-
<groupId>com.comphenix.packetwrapper</groupId>
6-
<artifactId>PacketWrapper</artifactId>
7-
<version>1.16.4-R0.1-SNAPSHOT</version>
5+
<groupId>ru.progrm-jarvis.minecraft</groupId>
6+
<artifactId>packet-wrapper</artifactId>
7+
<version>1.16.4-SNAPSHOT</version>
88

99
<name>PacketWrapper</name>
1010

@@ -28,20 +28,16 @@
2828

2929
<distributionManagement>
3030
<repository>
31-
<id>dmulloy2-repo</id>
32-
<url>https://repo.dmulloy2.net/content/repositories/releases/</url>
31+
<id>github-package-registry</id>
32+
<url>https://maven.pkg.github.com/JarvisCraft/PacketWrapper</url>
3333
</repository>
34-
<snapshotRepository>
35-
<id>dmulloy2-repo</id>
36-
<url>https://repo.dmulloy2.net/content/repositories/snapshots/</url>
37-
</snapshotRepository>
3834
</distributionManagement>
3935

4036
<dependencies>
4137
<dependency>
4238
<groupId>org.spigotmc</groupId>
4339
<artifactId>spigot</artifactId>
44-
<version>${project.version}</version>
40+
<version>1.16.4-R0.1-SNAPSHOT</version>
4541
<scope>provided</scope>
4642
</dependency>
4743
<dependency>

0 commit comments

Comments
 (0)