name: Build Distributions

on:
  release:
    types:
      - released

jobs:
  build-distributions:
    name: Build Distributions
    runs-on: ubuntu-latest
    steps:
      - id: checkout-code
        name: Checkout code
        uses: actions/checkout@v2
      - id: setup-jdk
        name: Setup JDK
        uses: actions/setup-java@v1
        with:
          java-version: 17
      - id: build
        name: Build distribution
        run: |
          gradle -v
          gradle build
      - id: upload-distributions
        name: Upload Distributions
        uses: softprops/action-gh-release@v1
        with:
          files: ./build/distributions/*

  build-packages:
    strategy:
      matrix:
        os:
          - windows-latest
          - ubuntu-latest
          - macos-latest
    name: Build System Packages on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    steps:
      - id: checkout-code
        name: Checkout code
        uses: actions/checkout@v2
      - id: setup-jdk
        name: Setup JDK
        uses: actions/setup-java@v1
        with:
          java-version: 17
      - id: jpackage
        name: Run jpackage
        run: |
          gradle -v
          gradle jpackageZip
      - id: upload-distributions
        name: Upload Distributions
        uses: softprops/action-gh-release@v1
        with:
          files: ./build/distributions/*

name: Build Distributions

on:
  release:
    types:
      - released

jobs:
  build-distributions:
    name: Build Distributions
    runs-on: ubuntu-latest
    steps:
      - id: checkout-code
        name: Checkout code
        uses: actions/checkout@v2
      - id: setup-jdk
        name: Setup JDK
        uses: actions/setup-java@v1
        with:
          java-version: 17
      - id: build
        name: Build distribution
        run: |
          gradle -v
          gradle build
      - id: upload-distributions
        name: Upload Distributions
        uses: softprops/action-gh-release@v1
        with:
          files: ./build/distributions/*

  build-packages:
    strategy:
      matrix:
        os:
          - windows-latest
          - ubuntu-latest
          # - macos-latest
    name: Build System Packages on ${{ matrix.os }}
    runs-on: ${{ matrix.os }}
    steps:
      - id: checkout-code
        name: Checkout code
        uses: actions/checkout@v2
      - id: setup-jdk
        name: Setup JDK
        uses: actions/setup-java@v1
        with:
          java-version: 17
      - id: jpackage
        name: Run jpackage
        run: |
          gradle -v
          gradle jpackageZip
      - id: upload-distributions
        name: Upload Distributions
        uses: softprops/action-gh-release@v1
        with:
          files: ./build/distributions/*

Remove macos from build matrix
Remove macos from build matrix
