Skip to content

Commit

Permalink
Merge pull request #45 from pop4959/basic-github-actions
Browse files Browse the repository at this point in the history
Basic GitHub Actions
  • Loading branch information
ocelotpotpie committed Dec 29, 2023
2 parents d47e3f6 + 2222d6a commit 85c5a9f
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build FreedomChat
on: [ push, pull_request ]
jobs:
build:
# Only run on PRs if the source branch is on someone else's repo
if: ${{ github.event_name != 'pull_request' || github.repository != github.event.pull_request.head.repo.full_name }}
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Gradle wrapper validation
uses: gradle/wrapper-validation-action@v1
- name: Set up JDK
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: '17'
- name: Cache dependencies
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*', '**/gradle-wrapper.properties') }}
restore-keys: |
${{ runner.os }}-gradle-
- name: Build
run: ./gradlew build
- name: Upload
uses: actions/upload-artifact@v4
with:
name: FreedomChat
path: "build/libs/FreedomChat-*.jar"

0 comments on commit 85c5a9f

Please sign in to comment.