Skip to content

Commit

Permalink
Forge Version Github Action
Browse files Browse the repository at this point in the history
  • Loading branch information
lyuxc-unknow committed Jan 17, 2024
1 parent 0e82266 commit 1461530
Showing 1 changed file with 41 additions and 0 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Build

on: [push, pull_request]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1000
fetch-tags: true

- name: Setup JDK 17
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'microsoft'

- name: Make gradlew executable
run: chmod +x ./gradlew

- name: Clean
uses: gradle/gradle-build-action@v2
with:
arguments: clean

- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build

- name: Get short SHA
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_ENV

- name: Upload build artifacts
uses: actions/upload-artifact@v3
with:
name: Jrrp-Forge-${{ env.SHORT_SHA }}
path: '**/build/libs/'

0 comments on commit 1461530

Please sign in to comment.