Skip to content

Upload workflow build after successful build and tests #26

Upload workflow build after successful build and tests

Upload workflow build after successful build and tests #26

Workflow file for this run

name: Build
on: [ push, pull_request ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: Build (Gradle Wrapper)
run: ./gradlew build
test:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: Test with Gradle Wrapper
run: ./gradlew test
create-and-upload-jar:
runs-on: ubuntu-latest
needs: [build, test]
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Set up JDK 21
uses: actions/setup-java@v4
with:
java-version: '21'
distribution: 'temurin'
- name: Setup Gradle
uses: gradle/actions/setup-gradle@417ae3ccd767c252f5661f1ace9f835f9654f2b5 # v3.1.0
- name: Create Release Jar (Gradle Wrapper)
run: ./gradlew jar
- name: Upload jar-File to workflow artifacts
uses: actions/upload-artifact@v4
with:
name: Editor-${{ github.sha }}.jar
path: build/libs/*.jar