Skip to content

Commit

Permalink
Github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
Rakambda committed Oct 20, 2020
1 parent f6aa1f8 commit f1c8774
Show file tree
Hide file tree
Showing 2 changed files with 41 additions and 48 deletions.
45 changes: 41 additions & 4 deletions .github/workflows/gradle_build.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Build
name: CI

on: [push]
on: [ push ]

env:
APP_JAVA_VERSION: 8

jobs:
build:
Expand All @@ -11,7 +14,7 @@ jobs:
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 8
java-version: ${{ env.APP_JAVA_VERSION }}
- uses: actions/cache@v1
name: Restore gradle cache
with:
Expand All @@ -26,10 +29,44 @@ jobs:
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Set wrapper permissions
- name: Set gradle permissions
run: chmod +x gradlew
- name: Check project
run: ./gradlew check
env:
GITHUB_USER: RakSrinaNa
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

publish-curseforge:
runs-on: ubuntu-latest
needs: build
if: "startsWith(github.ref, 'refs/tags/')"
steps:
- name: Checkout source
uses: actions/checkout@v2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: ${{ env.APP_JAVA_VERSION }}
- uses: actions/cache@v1
name: Restore gradle cache
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: |
${{ runner.OS }}-gradle-${{ env.cache-name }}-
${{ runner.OS }}-gradle-
${{ runner.OS }}-
- uses: actions/cache@v1
name: Cache gradle wrapper
with:
path: ~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('gradle/wrapper/gradle-wrapper.properties') }}
- name: Set gradle permissions
run: chmod +x gradlew
- name: Push on CurseForge
run: ./gradlew curseforge
env:
GITHUB_USER: RakSrinaNa
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CURSEFORGE_API_KEY: ${{ secrets.CURSEFORGE_API_KEY }}
44 changes: 0 additions & 44 deletions .github/workflows/gradle_deploy.yml

This file was deleted.

0 comments on commit f1c8774

Please sign in to comment.