From bcb6a8d4be44ec236e94c48072220056105d7669 Mon Sep 17 00:00:00 2001 From: Petr Portnov Date: Fri, 22 Jan 2021 21:02:56 +0300 Subject: [PATCH] build: temporarily use personal GitHub Package Registry as a Maven repository --- .github-actions/maven/settings.xml | 11 ++++++++++ .github/workflows/deploy.yml | 34 ++++++++++++++++++++++++++++++ PacketWrapper/pom.xml | 16 ++++++-------- 3 files changed, 51 insertions(+), 10 deletions(-) create mode 100644 .github-actions/maven/settings.xml create mode 100644 .github/workflows/deploy.yml diff --git a/.github-actions/maven/settings.xml b/.github-actions/maven/settings.xml new file mode 100644 index 00000000..5e3a0d7c --- /dev/null +++ b/.github-actions/maven/settings.xml @@ -0,0 +1,11 @@ + + + + + github-package-registry + JarvisCraft + ${env.GITHUB_TOKEN} + + + \ No newline at end of file diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 00000000..ce506809 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -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 diff --git a/PacketWrapper/pom.xml b/PacketWrapper/pom.xml index 190e894d..bb3db1ea 100644 --- a/PacketWrapper/pom.xml +++ b/PacketWrapper/pom.xml @@ -2,9 +2,9 @@ 4.0.0 - com.comphenix.packetwrapper - PacketWrapper - 1.16.4-R0.1-SNAPSHOT + ru.progrm_jarvis.minecraft + PacketWrapper-BC + 1.16.4-SNAPSHOT PacketWrapper @@ -28,20 +28,16 @@ - dmulloy2-repo - https://repo.dmulloy2.net/content/repositories/releases/ + github-package-registry + https://maven.pkg.github.com/JarvisCraft/PacketWrapper - - dmulloy2-repo - https://repo.dmulloy2.net/content/repositories/snapshots/ - org.spigotmc spigot - ${project.version} + 1.16.4-R0.1-SNAPSHOT provided