Update maven-publish.yml #4
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
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created | |
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path | |
name: Maven Package | |
on: | |
push: | |
branches: | |
- 'main' | |
jobs: | |
build_jar: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'corretto' | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- run: mkdir staging && cp target/dxfeed-jni-native-sdk-*.jar staging | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: Package | |
path: staging | |
- name: Publish package | |
run: mvn -B deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
build_native: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Change directory to native sources | |
run: cd src/main/c | |
- name: Install latest CMake and Ninja | |
- uses: lukka/get-cmake@latest | |
- name: Run CMake consuming CMakePreset.json and run vcpkg to build packages | |
- uses: lukka/run-cmake@v10 | |
with: | |
cmakeListsTxtPath: ./CMakeLists.txt | |