mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-21 19:43:28 +01:00
use github actions
This commit is contained in:
parent
21c0483a43
commit
13a95db06c
2 changed files with 28 additions and 17 deletions
28
.github/workflows/main.yml
vendored
Normal file
28
.github/workflows/main.yml
vendored
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
on: [push, pull_request]
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Clone repository
|
||||||
|
uses: actions/checkout@v4
|
||||||
|
- name: Setup Java
|
||||||
|
uses: actions/setup-java@v4
|
||||||
|
with:
|
||||||
|
java-version: '17'
|
||||||
|
distribution: 'temurin'
|
||||||
|
- name: Cache
|
||||||
|
uses: actions/cache@v4
|
||||||
|
with:
|
||||||
|
path: |
|
||||||
|
~/.gradle/caches
|
||||||
|
~/.gradle/wrapper
|
||||||
|
key: ${{ hashFiles('**/build.gradle', '**/gradle-wrapper.properties') }}
|
||||||
|
- name: Build
|
||||||
|
run: |
|
||||||
|
chmod +x ./gradlew
|
||||||
|
./gradlew build --no-daemon
|
||||||
|
- name: Upload
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: Mod Jar
|
||||||
|
path: build/libs/**.jar
|
|
@ -1,17 +0,0 @@
|
||||||
steps:
|
|
||||||
build:
|
|
||||||
image: eclipse-temurin:17-jdk
|
|
||||||
commands:
|
|
||||||
- chmod +x ./gradlew
|
|
||||||
- ./gradlew build --no-daemon
|
|
||||||
maven-publish:
|
|
||||||
image: eclipse-temurin:17-jdk
|
|
||||||
when:
|
|
||||||
branch: main
|
|
||||||
commands:
|
|
||||||
- chmod +x ./gradlew
|
|
||||||
- ./gradlew publish --no-daemon
|
|
||||||
environment:
|
|
||||||
- LOCAL_MAVEN=/var/www/maven
|
|
||||||
volumes:
|
|
||||||
- /var/www/maven:/var/www/maven
|
|
Loading…
Reference in a new issue