Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 44 additions & 1 deletion .github/workflows/publish-on-maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,58 @@ on:
tags:
- '**'

env:
NATIVE_LIBS_DIR: ${{ github.workspace }}/build/nativeLibs

jobs:
build-native:
runs-on: ${{ matrix.os }}
strategy:
matrix:
include:
- os: ubuntu-latest
command: bash linuxlib/build.sh
- os: macos-latest
command: bash maclib/build.sh
- os: windows-latest
command: cmd /c winlib/build.bat

steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Build native binary
run: ${{ matrix.command }}
env:
NATIVE_LIBS_OUTPUT_DIR: ${{ env.NATIVE_LIBS_DIR }}

- name: Upload native binaries
uses: actions/upload-artifact@v4
with:
name: nativeLibs-${{ matrix.os }}
path: ${{ env.NATIVE_LIBS_DIR }}/**

publish:
needs: [ "build-native" ]
runs-on: macos-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Download all native binaries
uses: actions/download-artifact@v4
with:
name: nativeLibs-*
path: ${{ env.NATIVE_LIBS_DIR }}
merge-multiple: true

- name: Copy native libs into src/commonMain/resources/
run: |
mkdir -p src/commonMain/resources/
cp -r ${{ env.NATIVE_LIBS_DIR }}/* src/commonMain/resources/

- name: Set up JDK
uses: actions/setup-java@v3
with:
Expand All @@ -27,4 +71,3 @@ jobs:
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNINGINMEMORYKEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyId: ${{ secrets.SIGNINGKEYID }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNINGPASSWORD }}

7 changes: 6 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,9 @@ bin/
tray_position.properties

linuxlib/build-x86-64
linuxlibdbus/build-x86-64
linuxlibdbus/build-x86-64

# don't commit compiled native binaries
src/commonMain/resources/**/*.so
src/commonMain/resources/**/*.dll
src/commonMain/resources/**/*.dylib
Binary file not shown.
Binary file not shown.
Binary file removed src/commonMain/resources/linux-x86-64/libsystray.so
Binary file not shown.
Binary file removed src/commonMain/resources/win32-arm64/tray.dll
Binary file not shown.
Binary file removed src/commonMain/resources/win32-x86-64/tray.dll
Binary file not shown.