Skip to content

Commit

Permalink
build: temporarily use personal GitHub Package Registry as a Maven re…
Browse files Browse the repository at this point in the history
…pository
  • Loading branch information
JarvisCraft committed Feb 3, 2021
1 parent 66ce68d commit 338cad0
Show file tree
Hide file tree
Showing 3 changed files with 52 additions and 10 deletions.
11 changes: 11 additions & 0 deletions .github-actions/maven/deployment.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd">
<servers>
<server>
<id>sonatype-ossrh</id>
<username>${env.SONATYPE_OSSRH_DEPLOYER}</username>
<password>${env.SONATYPE_OSSRH_TOKEN}</password>
</server>
</servers>
</settings>
35 changes: 35 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Deploy

on: [ push, workflow_dispatch ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2

- name: Set up JDK 1.8
uses: actions/setup-java@v1
with:
java-version: 1.8

- name: Cache Maven packages
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-m2

- name: Deploy
env:
SONATYPE_OSSRH_DEPLOYER: ${{ secrets.SONATYPE_OSSRH_DEPLOYER }}
SONATYPE_OSSRH_TOKEN: ${{ secrets.SONATYPE_OSSRH_TOKEN }}
run: mvn -B -f ./PacketWrapper/pom.xml deploy -s ./.github-actions/maven/deployment.xml

- name: Upload artifacts
uses: actions/upload-artifact@v2
with:
name: plugin
path: PacketWrapper/target/PacketWrapper.jar
16 changes: 6 additions & 10 deletions PacketWrapper/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.comphenix.packetwrapper</groupId>
<artifactId>PacketWrapper</artifactId>
<version>1.16.4-R0.1-SNAPSHOT</version>
<groupId>ru.progrm-jarvis.minecraft</groupId>
<artifactId>packet-wrapper</artifactId>
<version>1.16.4-SNAPSHOT</version>

<name>PacketWrapper</name>

Expand All @@ -27,21 +27,17 @@
</repositories>

<distributionManagement>
<repository>
<id>dmulloy2-repo</id>
<url>https://repo.dmulloy2.net/content/repositories/releases/</url>
</repository>
<snapshotRepository>
<id>dmulloy2-repo</id>
<url>https://repo.dmulloy2.net/content/repositories/snapshots/</url>
<id>sonatype-ossrh</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>

<dependencies>
<dependency>
<groupId>org.spigotmc</groupId>
<artifactId>spigot</artifactId>
<version>${project.version}</version>
<version>1.16.4-R0.1-SNAPSHOT</version>
<scope>provided</scope>
</dependency>
<dependency>
Expand Down

0 comments on commit 338cad0

Please sign in to comment.