From 9c60b1e89a9946884b3eed529e61e2ccca7ef611 Mon Sep 17 00:00:00 2001 From: Martmists Date: Tue, 3 Sep 2024 18:58:42 +0200 Subject: [PATCH] Set up building Signed-off-by: Martmists --- .editorconfig | 16 ++++++++++++++++ .github/workflows/build.yaml | 35 +++++++++++++++++++++++++++++++++++ build.gradle.kts | 12 ++++++++++-- 3 files changed, 61 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/build.yaml diff --git a/.editorconfig b/.editorconfig index 3e524ff..780b23e 100644 --- a/.editorconfig +++ b/.editorconfig @@ -126,3 +126,19 @@ ij_kotlin_while_on_new_line = false ij_kotlin_wrap_elvis_expressions = 1 ij_kotlin_wrap_expression_body_functions = 1 ij_kotlin_wrap_first_method_in_call_chain = false + +[{*.yaml,*.yml}] +tab_width = 2 +ij_yaml_align_values_properties = do_not_align +ij_yaml_autoinsert_sequence_marker = true +ij_yaml_block_mapping_on_new_line = false +ij_yaml_indent_sequence_value = true +ij_yaml_keep_indents_on_empty_lines = false +ij_yaml_keep_line_breaks = true +ij_yaml_line_comment_add_space = false +ij_yaml_line_comment_add_space_on_reformat = false +ij_yaml_line_comment_at_first_column = true +ij_yaml_sequence_on_new_line = false +ij_yaml_space_before_colon = false +ij_yaml_spaces_within_braces = true +ij_yaml_spaces_within_brackets = true diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..7381541 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,35 @@ +on: push + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + with: + submodules: true + + - name: Install dependencies + run: sudo apt-get update && sudo apt-get install -y fakeroot + + - name: Set up JDK + uses: actions/setup-java@v2 + with: + java-version: '17' + distribution: 'adopt' + cache: 'gradle' + + - name: Build with Gradle + run: ./gradlew packageReleaseDeb + + - name: Release + uses: softprops/action-gh-release@v2 + if: startsWith(github.ref, 'refs/tags/') + with: + files: build/compose/binaries/main-release/deb/*.deb + + - name: Upload Artifact + uses: actions/upload-artifact@v4 + if: "!startsWith(github.ref, 'refs/tags/')" + with: + path: build/compose/binaries/main-release/deb/*.deb diff --git a/build.gradle.kts b/build.gradle.kts index 14a5355..719715a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -44,10 +44,18 @@ compose { mainClass = "com.martmists.wallpaperengine.MainKt" nativeDistributions { - targetFormats(TargetFormat.AppImage) - packageName = "Wallpaper Engine" + targetFormats(TargetFormat.Deb) + packageName = "WallpaperEngine" packageVersion = project.version as String } + + buildTypes { + release { + proguard { + isEnabled = false + } + } + } } } }