Advanced-Portals/.github/workflows/gradle.yml

40 lines
1.1 KiB
YAML
Raw Normal View History

name: Build Project
2021-03-23 02:49:20 +01:00
on:
push:
branches:
- '**'
tags:
- '*'
pull_request:
2021-03-23 02:49:20 +01:00
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
2021-05-12 03:07:31 +02:00
- 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
2021-05-12 03:07:31 +02:00
- 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