ci: Updating build pipeline
This commit is contained in:
parent
4b047466f6
commit
4fa4a1f8bf
|
@ -0,0 +1,40 @@
|
|||
name: Build Project
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- '**'
|
||||
tags:
|
||||
- '*'
|
||||
pull_request:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 8
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
distribution: 'zulu'
|
||||
java-version: '1.8'
|
||||
- name: Cache Gradle packages
|
||||
uses: actions/cache@v2
|
||||
with:
|
||||
path: ~/.gradle/caches
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
|
||||
restore-keys: ${{ runner.os }}-gradle
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build
|
||||
- name: Upload to Discord (If pre-release tag)
|
||||
if: "startsWith(github.ref, 'refs/tags/v') && contains(github.ref, '-')"
|
||||
env:
|
||||
DISCORD_WEBHOOK: ${{ secrets.DISCORD_WEBHOOK }}
|
||||
run: ./gradlew discordupload
|
||||
- name: Publish to Curseforge (If release tag)
|
||||
if: "startsWith(github.ref, 'refs/tags/v') && !contains(github.ref, '-')"
|
||||
env:
|
||||
CURSE_API: ${{ secrets.CURSE_API }}
|
||||
run: ./gradlew curseforge
|
|
@ -1,5 +1,6 @@
|
|||
*.class
|
||||
.*
|
||||
!.github
|
||||
/build/
|
||||
/target/
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
language: java
|
||||
cache:
|
||||
directories:
|
||||
- $HOME/.m2
|
Loading…
Reference in New Issue