Skip to content

liufang-robot Linux java build #106

liufang-robot Linux java build

liufang-robot Linux java build #106

name: Linux java build
run-name: ${{ github.actor }} Linux java build
on:
workflow_dispatch:
pull_request:
jobs:
linux_java_build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '11'
- name: configure
run: cmake -S. -Bbuild -DBUILD_JAVA=ON
- name: build
run: cmake --build build
- name: upload artifact
uses: actions/upload-artifact@v3
with:
path: ./build/java/lebai-java/target/*.jar
release:
if: ${{ contains(github.ref, 'tags/v') }}
needs: [linux_java_build]
strategy:
fail-fast: false
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
- name: Zip Artifact
run: for dir in `ls`; do zip -r ${dir}.zip ${dir}; done
- name: Release
uses: softprops/action-gh-release@v1
with:
draft: false
prerelease: false
files: |
*