mirror of
https://github.com/sekwah41/Advanced-Portals.git
synced 2024-11-25 20:15:58 +01:00
40 lines
1.1 KiB
YAML
40 lines
1.1 KiB
YAML
name: Build Project
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- '**'
|
|
tags:
|
|
- '*'
|
|
pull_request:
|
|
|
|
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 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
|