liufang-robot Linux java build #102
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: | | |
* |