Skip to content

Commit

Permalink
create separate workflows for publishing debugger on win/linux/macos
Browse files Browse the repository at this point in the history
  • Loading branch information
Nek-12 committed Mar 6, 2024
1 parent db30e5a commit de00b77
Show file tree
Hide file tree
Showing 5 changed files with 101 additions and 14 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/debugger-linux.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: debugger-linux

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

concurrency:
group: "publish-linux"
cancel-in-progress: true

jobs:
publish-windows:
runs-on: linux-latest

steps:
- uses: actions/checkout@v3

- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
check-latest: true
java-version: 21
cache: 'gradle'

- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Create local properties
env:
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: echo "$LOCAL_PROPERTIES" > local.properties

- name: Create platform debugger distributable
run: ./gradlew debugger:app:packageDistributionForCurrentOS

- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: Debugger_Linux
path: ./debugger/app/build/compose/binaries/main/deb/*
if-no-files-found: error
overwrite: false
48 changes: 48 additions & 0 deletions .github/workflows/debugger-macos.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: debugger-macos

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

concurrency:
group: "publish-macos"
cancel-in-progress: true

jobs:
publish-windows:
runs-on: macos-latest

steps:
- uses: actions/checkout@v3

- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties

- name: set up JDK
uses: actions/setup-java@v3
with:
distribution: 'zulu'
check-latest: true
java-version: 21
cache: 'gradle'

- name: Validate gradle wrapper
uses: gradle/wrapper-validation-action@v1

- name: Create local properties
env:
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: echo "$LOCAL_PROPERTIES" > local.properties

- name: Create platform debugger distributable
run: ./gradlew debugger:app:packageDistributionForCurrentOS

- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: Debugger_Macos
path: ./debugger/app/build/compose/binaries/main/dmg/*
if-no-files-found: error
overwrite: false
7 changes: 4 additions & 3 deletions .github/workflows/debugger-win.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
name: publish
name: debugger-windows

on:
push:
tags:
- '2.*'
branches: [ master ]
pull_request:
branches: [ master ]

concurrency:
group: "publish-win"
Expand Down
11 changes: 0 additions & 11 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,6 @@ jobs:
LOCAL_PROPERTIES: ${{ secrets.LOCAL_PROPERTIES }}
run: echo "$LOCAL_PROPERTIES" > local.properties

- name: Create macOS debugger distributable
run: ./gradlew debugger:app:packageDistributionForCurrentOS

- name: Upload a Build Artifact
uses: actions/upload-artifact@v4.3.1
with:
name: Debugger_MacOS
path: ./debugger/app/build/compose/binaries/main/dmg/*
if-no-files-found: error
overwrite: true

- name: Publish to sonatype
# It's important to not upload in parallel or duplicate repos will be created
run: ./gradlew publishAllPublicationsToSonatypeRepository -Dorg.gradle.parallel=false --stacktrace
1 change: 1 addition & 0 deletions debugger/app/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ compose.desktop {
windows {
dirChooser = true
menu = false
shortcut = true
perUserInstall = true
upgradeUuid = Config.debuggerAppId
iconFile = iconDir.resolve("favicon.ico")
Expand Down

0 comments on commit de00b77

Please sign in to comment.