Skip to content

Commit 72b5b90

Browse files
committed
improvement: Upload zip to limit download sizes
1 parent f28644a commit 72b5b90

File tree

1 file changed

+13
-9
lines changed

1 file changed

+13
-9
lines changed

.github/workflows/release-native.yml

+13-9
Original file line numberDiff line numberDiff line change
@@ -23,15 +23,13 @@ jobs:
2323
fail-fast: false
2424
matrix:
2525
deploy: [
26-
{ os: macOS-13, name: scalafmt-x86_64-apple-darwin },
27-
{ os: macOS-14, name: scalafmt-aarch64-apple-darwin },
28-
{ os: ubuntu-latest, name: scalafmt-x86_64-pc-linux },
29-
{ os: ubuntu-24.04-arm, name: scalafmt-aarch64-pc-linux },
30-
{ os: windows-latest, name: scalafmt-x86_64-pc-win32 }
26+
{ os: macOS-13, name: scalafmt-x86_64-apple-darwin.zip },
27+
{ os: macOS-14, name: scalafmt-aarch64-apple-darwin.zip },
28+
{ os: ubuntu-latest, name: scalafmt-x86_64-pc-linux.zip },
29+
{ os: ubuntu-24.04-arm, name: scalafmt-aarch64-pc-linux.zip },
30+
{ os: windows-latest, name: scalafmt-x86_64-pc-win32.zip }
3131
]
3232
runs-on: ${{ matrix.deploy.os }}
33-
env:
34-
BINARY_NAME: ${{ (startsWith(matrix.deploy.os, 'windows') && 'scalafmt.exe') || 'scalafmt' }}
3533
steps:
3634
- uses: actions/checkout@v4
3735
with:
@@ -45,17 +43,23 @@ jobs:
4543
- run: sbt scala-native
4644
env:
4745
CI: true
46+
- name: Zip artifact for deployment
47+
if: ${{ !startsWith(matrix.deploy.os, 'windows') }}
48+
run: zip ${{ matrix.deploy.name }} scalafmt
49+
- name: Zip artifact for deployment
50+
if: ${{ startsWith(matrix.deploy.os, 'windows') }}
51+
run: 7z a ${{ matrix.deploy.name }} scalafmt.exe
4852
- uses: actions/upload-artifact@master
4953
with:
5054
name: ${{ matrix.deploy.name }}
51-
path: ${{ env.BINARY_NAME }}
55+
path: ${{ matrix.deploy.name }}
5256
- name: Upload release to Github
5357
uses: actions/[email protected]
5458
env:
5559
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5660
with:
5761
upload_url: ${{ github.event.release.upload_url }}
58-
asset_path: ${{ env.BINARY_NAME }}
62+
asset_path: ${{ matrix.deploy.name }}
5963
asset_name: ${{ matrix.deploy.name }}
6064
asset_content_type: application/zip
6165
dockerize:

0 commit comments

Comments
 (0)