Skip to content

Commit

Permalink
ci(desktop): create common steps
Browse files Browse the repository at this point in the history
  • Loading branch information
Irineu333 committed Oct 29, 2024
1 parent 5d012e5 commit 8a9d468
Showing 1 changed file with 13 additions and 23 deletions.
36 changes: 13 additions & 23 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,11 @@ on:
- master

jobs:
build-linux:
runs-on: ubuntu-latest
common-steps:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -17,9 +20,14 @@ jobs:
# TODO: replace this once https://github.com/actions/setup-java/pull/637 gets merged.
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
with:
java-version: '17'
java-version: '17.0.12'
distribution: 'jetbrains'
cache: 'gradle'

build-linux:
needs: common-steps
runs-on: ubuntu-latest
steps:
- name: Package
run: |
./gradlew application:packageReleaseTarGz
Expand All @@ -40,18 +48,9 @@ jobs:
path: binaries/*

build-windows:
needs: common-steps
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup JDK
# TODO: replace this once https://github.com/actions/setup-java/pull/637 gets merged.
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
with:
java-version: '17'
distribution: 'jetbrains'

- name: Package exe
run: ./gradlew application:packageReleaseExe

Expand All @@ -62,18 +61,9 @@ jobs:
path: application/build/compose/binaries/main-release/exe/*.exe

build-macos:
needs: common-steps
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup JDK
# TODO: replace this once https://github.com/actions/setup-java/pull/637 gets merged.
uses: gmitch215/setup-java@6d2c5e1f82f180ae79f799f0ed6e3e5efb4e664d
with:
java-version: '17'
distribution: 'jetbrains'

- name: Package dmg
run: ./gradlew application:packageReleaseDmg

Expand Down

0 comments on commit 8a9d468

Please sign in to comment.