Skip to content

Commit

Permalink
ci: Build both mac-amd64 and mac-arm64 native images
Browse files Browse the repository at this point in the history
  • Loading branch information
dmurat committed May 22, 2024
1 parent 41f9b38 commit e788964
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,19 @@ jobs:
build:
strategy:
matrix:
os: [ linux, macos]
os: [ linux, mac-amd64, mac-arm64]
include:
- os: 'linux'
version: 'ubuntu-latest'
label: 'linux'
native-image-name: 'klokwrk-tool-gradle-source-repack'
- os: 'macos'
version: 'macos-latest'
label: 'mac'
- os: 'mac-amd64'
version: 'macos-13' # This runs on Intel mac image (https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories)
label: 'mac-amd64'
native-image-name: 'klokwrk-tool-gradle-source-repack'
- os: 'mac-arm64'
version: 'macos-14' # This runs on M1 mac image (https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories)
label: 'mac-arm64'
native-image-name: 'klokwrk-tool-gradle-source-repack'

runs-on: ${{ matrix.version }}
Expand Down
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ jobs:
- name: Set execute permissions on binaries
run: |
chmod +x klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-linux/klokwrk-tool-gradle-source-repack
chmod +x klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-mac/klokwrk-tool-gradle-source-repack
chmod +x klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-mac-amd64/klokwrk-tool-gradle-source-repack
chmod +x klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-mac-arm64/klokwrk-tool-gradle-source-repack
- name: Compress binaries
run: |
mkdir artifacts-klokwrk-tool-gradle-source-repack
tar -cvzf artifacts-klokwrk-tool-gradle-source-repack/klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-linux.tar.gz klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-linux/klokwrk-tool-gradle-source-repack
tar -cvzf artifacts-klokwrk-tool-gradle-source-repack/klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-mac.tar.gz klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-mac/klokwrk-tool-gradle-source-repack
tar -cvzf artifacts-klokwrk-tool-gradle-source-repack/klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-mac-amd64.tar.gz klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-mac-amd64/klokwrk-tool-gradle-source-repack
tar -cvzf artifacts-klokwrk-tool-gradle-source-repack/klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-mac-arm64.tar.gz klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-mac-arm64/klokwrk-tool-gradle-source-repack
zip artifacts-klokwrk-tool-gradle-source-repack/klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-java.zip klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-jar/*.jar
zip artifacts-klokwrk-tool-gradle-source-repack/klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-win.zip klokwrk-tool-gradle-source-repack_${{ github.event.inputs.release-version }}-win/*.exe
Expand All @@ -76,7 +78,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0 # Generated changelog displays only the changes from checked-out commits. Therefore, we need a full history.
fetch-depth: 0 # The generated changelog displays only the changes from checked-out commits. Therefore, we need a full history.

- name: Download klokwrk-tool-gradle-source-repack binaries
uses: actions/download-artifact@v4
Expand Down

0 comments on commit e788964

Please sign in to comment.