Create build.yml
This commit is contained in:
parent
86bf7be44f
commit
9ef9f85bec
1 changed files with 26 additions and 0 deletions
26
.github/workflows/build.yml
vendored
Normal file
26
.github/workflows/build.yml
vendored
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
name: Build JAR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ main ]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v2
|
||||
with:
|
||||
java-version: '17'
|
||||
- name: Grant execute permission for gradlew
|
||||
run: chmod +x gradlew
|
||||
- name: Get project version
|
||||
run: echo "version=$(grep '^version' build.gradle | cut -d' ' -f3 | tr -d '\"')" >> $GITHUB_ENV
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew build -x test
|
||||
- name: Publish artifact
|
||||
uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: FoliaFlow-${{ env.version }}-${{ github.sha }}
|
||||
path: build/libs/FoliaFlow-${{ env.version }}.jar
|
||||
Loading…
Add table
Add a link
Reference in a new issue