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 Jan 22, 2021
1 parent 66ce68d commit bcb6a8d
Show file tree
Hide file tree
Showing 3 changed files with 51 additions and 10 deletions.
11 changes: 11 additions & 0 deletions .github-actions/maven/settings.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>github-package-registry</id>
<username>JarvisCraft</username>
<password>${env.GITHUB_TOKEN}</password>
</server>
</servers>
</settings>
34 changes: 34 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
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:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: mvn -B -f ./PacketWrapper/pom.xml deploy -s ./.github-actions/maven/settings.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>PacketWrapper-BC</artifactId>
<version>1.16.4-SNAPSHOT</version>

<name>PacketWrapper</name>

Expand All @@ -28,20 +28,16 @@

<distributionManagement>
<repository>
<id>dmulloy2-repo</id>
<url>https://repo.dmulloy2.net/content/repositories/releases/</url>
<id>github-package-registry</id>
<url>https://maven.pkg.github.com/JarvisCraft/PacketWrapper</url>
</repository>
<snapshotRepository>
<id>dmulloy2-repo</id>
<url>https://repo.dmulloy2.net/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 bcb6a8d

Please sign in to comment.