mirror of
https://github.com/EssentialsX/Essentials.git
synced 2024-11-15 07:05:52 +01:00
49 lines
1.2 KiB
YAML
49 lines
1.2 KiB
YAML
name: Build EssentialsX
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- 2.x
|
|
- mc/*
|
|
pull_request:
|
|
branches:
|
|
- 2.x
|
|
|
|
jobs:
|
|
build:
|
|
name: Build and upload
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Git repo
|
|
uses: actions/checkout@v2
|
|
with:
|
|
fetch-depth: 0
|
|
- name: Restore Gradle cache
|
|
uses: actions/cache@v2
|
|
with:
|
|
path: ~/.gradle/caches
|
|
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-gradle-
|
|
- name: Set up JDK 1.8
|
|
uses: actions/setup-java@v1
|
|
with:
|
|
java-version: 1.8
|
|
- name: Build with Gradle
|
|
run: |
|
|
chmod +x gradlew
|
|
./gradlew build --stacktrace
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@master
|
|
with:
|
|
name: EssentialsX plugin jars
|
|
path: jars/
|
|
- name: Deploy with Gradle
|
|
if: ${{ success() && github.event_name == 'push' && github.repository == 'EssentialsX/Essentials' && github.ref == 'refs/heads/2.x' }}
|
|
env:
|
|
ORG_GRADLE_PROJECT_essxUsername: ${{ secrets.ESSENTIALSX_DEPLOY_USERNAME }}
|
|
ORG_GRADLE_PROJECT_essxPassword: ${{ secrets.ESSENTIALSX_DEPLOY_PASSWORD }}
|
|
run: |
|
|
./gradlew publish
|