Skip to content

Commit

Permalink
Add workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
Sollace committed Oct 4, 2023
1 parent 43a470d commit 93b4d04
Show file tree
Hide file tree
Showing 3 changed files with 72 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/gradle-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build on Push
on:
- push
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v2
- name: Fetch Tags
run: git fetch --unshallow --tags -f
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build Gradle
uses: eskatos/gradle-command-action@v1
with:
arguments: check
19 changes: 19 additions & 0 deletions .github/workflows/gradle-check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Build on Pull Request
on:
- pull_request
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v2
- name: Fetch Tags
run: git fetch --unshallow --tags -f
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build Gradle
uses: eskatos/gradle-command-action@v1
with:
arguments: check
34 changes: 34 additions & 0 deletions .github/workflows/gradle-publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Publish
on:
push:
tags:
- '*'
jobs:
gradle:
runs-on: ubuntu-latest
steps:
- name: Checkout Commit
uses: actions/checkout@v2
with:
submodules: recursive
- name: Fetch Tags
run: git fetch --unshallow --tags -f
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 17
- name: Publish Maven Jar
env:
ACCESS_KEY: ${{ secrets.ACCESS_KEY }}
SECRET_KEY: ${{ secrets.SECRET_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: eskatos/gradle-command-action@v1
with:
arguments: build publish
- name: Publish Modrinth Jar
env:
MODRINTH_KEY: ${{ secrets.MODRINTH_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: eskatos/gradle-command-action@v1
with:
arguments: modrinth

0 comments on commit 93b4d04

Please sign in to comment.