mirror of
https://github.com/EssentialsX/Essentials.git
synced 2025-01-22 08:01:23 +01:00
Build with GitHub Actions (#2800)
* Add GitHub Actions workflow * Update workflow * Run BuildTools in workflow * Update build.yml * Add distributionManagement to pom.xml * Add GitHub registry Maven credentials * Remove Travis CI config * mkdir -p * Remove GitHub package registry push Didn't work anyway * Remove distributionManagement * Cache Maven repo * Fix step order * Use JitPack for VaultAPI
This commit is contained in:
parent
3b51b23ac2
commit
67b2a9a4f4
41
.github/workflows/build.yml
vendored
Normal file
41
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,41 @@
|
|||||||
|
name: Build EssentialsX
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- 2.x
|
||||||
|
- mc/*
|
||||||
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- 2.x
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Checkout Git repo
|
||||||
|
uses: actions/checkout@v1
|
||||||
|
- name: Restore Maven cache
|
||||||
|
uses: actions/cache@v1
|
||||||
|
with:
|
||||||
|
path: ~/.m2/repository
|
||||||
|
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-maven-
|
||||||
|
- name: Set up JDK 1.8
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 1.8
|
||||||
|
- name: Run BuildTools
|
||||||
|
if: steps.cache.outputs.cache-hit != 'true'
|
||||||
|
run: chmod +x scripts/buildtools.sh && ./scripts/buildtools.sh
|
||||||
|
- name: Build with Maven
|
||||||
|
run: mvn package --file pom.xml
|
||||||
|
- name: Copy artifacts
|
||||||
|
run: mkdir -p ./out/ && cp -t ./out/ **/target/Essentials*.jar
|
||||||
|
- uses: actions/upload-artifact@master
|
||||||
|
with:
|
||||||
|
name: Plugin jars
|
||||||
|
path: out/
|
13
.travis.yml
13
.travis.yml
@ -1,13 +0,0 @@
|
|||||||
language: java
|
|
||||||
|
|
||||||
jdk:
|
|
||||||
- openjdk8
|
|
||||||
|
|
||||||
cache:
|
|
||||||
directories:
|
|
||||||
- .buildtools
|
|
||||||
- $HOME/.m2
|
|
||||||
|
|
||||||
before_install:
|
|
||||||
- chmod +x scripts/buildtools.sh
|
|
||||||
- scripts/buildtools.sh
|
|
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>net.milkbowl.vault</groupId>
|
<groupId>com.github.milkbowl</groupId>
|
||||||
<artifactId>VaultAPI</artifactId>
|
<artifactId>VaultAPI</artifactId>
|
||||||
<version>1.7</version>
|
<version>1.7</version>
|
||||||
<scope>provided</scope>
|
<scope>provided</scope>
|
||||||
|
4
pom.xml
4
pom.xml
@ -35,6 +35,10 @@
|
|||||||
<id>paper-repo</id>
|
<id>paper-repo</id>
|
||||||
<url>https://papermc.io/repo/repository/maven-public/</url>
|
<url>https://papermc.io/repo/repository/maven-public/</url>
|
||||||
</repository>
|
</repository>
|
||||||
|
<repository>
|
||||||
|
<id>jitpack</id>
|
||||||
|
<url>https://jitpack.io</url>
|
||||||
|
</repository>
|
||||||
</repositories>
|
</repositories>
|
||||||
|
|
||||||
<modules>
|
<modules>
|
||||||
|
Loading…
Reference in New Issue
Block a user