From 12f412ed649ebd95e8690cd434d5b9711ee1bfc1 Mon Sep 17 00:00:00 2001 From: Nek-12 Date: Sun, 8 Dec 2024 14:50:06 +0100 Subject: [PATCH] chore: improve publish workflow to only build on release --- .github/workflows/desktop-linux.yml | 17 ++++++++++++++--- .github/workflows/desktop-macos.yml | 17 ++++++++++++++--- .github/workflows/desktop-win.yml | 17 ++++++++++++++--- .github/workflows/publish.yml | 13 +++++++++++++ 4 files changed, 55 insertions(+), 9 deletions(-) diff --git a/.github/workflows/desktop-linux.yml b/.github/workflows/desktop-linux.yml index 7cef95be..17d3850f 100644 --- a/.github/workflows/desktop-linux.yml +++ b/.github/workflows/desktop-linux.yml @@ -1,17 +1,24 @@ name: debugger-linux on: - push: - branches: [ master ] + workflow_call: + outputs: + debugger: + value: ${{ jobs.publish.outputs.debugger-url }} + sample: + value: ${{ jobs.publish.outputs.sample-url }} concurrency: group: "publish-linux" cancel-in-progress: true jobs: - publish-windows: + publish: runs-on: ubuntu-latest environment: publishing + outputs: + debugger-url: ${{ steps.upload-debugger.outputs.artifact-url }} + sample-url: ${{ steps.upload-sample.outputs.artifact-url }} steps: - uses: actions/checkout@v4 @@ -49,17 +56,21 @@ jobs: run: ./gradlew sample:packageDistributionForCurrentOS - name: Upload debugger + id: upload-debugger uses: actions/upload-artifact@v4.4.3 with: name: Debugger_Linux path: ./debugger/app/build/compose/binaries/main/deb/* if-no-files-found: error + compression-level: 0 overwrite: false - name: Upload sample + id: upload-sample uses: actions/upload-artifact@v4.4.3 with: name: Sample_Linux path: ./sample/build/compose/binaries/main/deb/* if-no-files-found: error + compression-level: 0 overwrite: false diff --git a/.github/workflows/desktop-macos.yml b/.github/workflows/desktop-macos.yml index 93b54179..bc4eae64 100644 --- a/.github/workflows/desktop-macos.yml +++ b/.github/workflows/desktop-macos.yml @@ -1,17 +1,24 @@ name: debugger-macos on: - push: - branches: [ master ] + workflow_call: + outputs: + debugger: + value: ${{ jobs.publish.outputs.debugger-url }} + sample: + value: ${{ jobs.publish.outputs.sample-url }} concurrency: group: "publish-macos" cancel-in-progress: true jobs: - publish-windows: + publish: runs-on: macos-latest environment: publishing + outputs: + debugger-url: ${{ steps.upload-debugger.outputs.artifact-url }} + sample-url: ${{ steps.upload-sample.outputs.artifact-url }} steps: - uses: actions/checkout@v4 @@ -49,17 +56,21 @@ jobs: run: ./gradlew sample:packageDistributionForCurrentOS - name: Upload debugger + id: upload-debugger uses: actions/upload-artifact@v4.4.3 with: name: Debugger_MacOS path: ./debugger/app/build/compose/binaries/main/dmg/* if-no-files-found: error + compression-level: 0 overwrite: false - name: Upload sample + id: upload-sample uses: actions/upload-artifact@v4.4.3 with: name: Sample_MacOS path: ./sample/build/compose/binaries/main/dmg/* if-no-files-found: error + compression-level: 0 overwrite: false diff --git a/.github/workflows/desktop-win.yml b/.github/workflows/desktop-win.yml index a17bc22f..c52078d1 100644 --- a/.github/workflows/desktop-win.yml +++ b/.github/workflows/desktop-win.yml @@ -1,17 +1,24 @@ name: debugger-windows on: - push: - branches: [ master ] + workflow_call: + outputs: + debugger: + value: ${{ jobs.publish.outputs.debugger-url }} + sample: + value: ${{ jobs.publish.outputs.sample-url }} concurrency: group: "publish-win" cancel-in-progress: true jobs: - publish-windows: + publish: runs-on: windows-latest environment: publishing + outputs: + debugger-url: ${{ steps.upload-debugger.outputs.artifact-url }} + sample-url: ${{ steps.upload-sample.outputs.artifact-url }} steps: - uses: actions/checkout@v4 @@ -50,17 +57,21 @@ jobs: run: ./gradlew sample:packageDistributionForCurrentOS - name: Upload debugger + id: upload-debugger uses: actions/upload-artifact@v4.4.3 with: name: Debugger_Windows path: ./debugger/app/build/compose/binaries/main/exe/* if-no-files-found: error + compression-level: 0 overwrite: false - name: Upload sample + id: upload-sample uses: actions/upload-artifact@v4.4.3 with: name: Sample_Windows path: ./sample/build/compose/binaries/main/exe/* if-no-files-found: error + compression-level: 0 overwrite: false diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 94dc0f6e..53d82c2f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -16,6 +16,13 @@ concurrency: cancel-in-progress: true jobs: + debugger-macos: + uses: ./.github/workflows/desktop-macos.yml + debugger-linux: + uses: ./.github/workflows/desktop-linux.yml + debugger-win: + uses: ./.github/workflows/desktop-win.yml + publish: runs-on: macos-latest @@ -72,6 +79,12 @@ jobs: commitMode: true configuration: ".github/changelog_config.json" + - name: Publish new plugin version + run: ./gradlew debugger:ideplugin:publishPlugin --no-configuration-cache + env: + CHANGELOG: ${{steps.build_changelog.outputs.changelog}} + + # TODO: Use matrix strat and attach artifacts to the release - name: Create GH release uses: ncipollo/release-action@v1.14.0 id: create_release