Skip to content

Commit

Permalink
improvement: Upload zip to limit download sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
tgodzik committed Feb 26, 2025
1 parent f28644a commit 72b5b90
Showing 1 changed file with 13 additions and 9 deletions.
22 changes: 13 additions & 9 deletions .github/workflows/release-native.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,15 +23,13 @@ jobs:
fail-fast: false
matrix:
deploy: [
{ os: macOS-13, name: scalafmt-x86_64-apple-darwin },
{ os: macOS-14, name: scalafmt-aarch64-apple-darwin },
{ os: ubuntu-latest, name: scalafmt-x86_64-pc-linux },
{ os: ubuntu-24.04-arm, name: scalafmt-aarch64-pc-linux },
{ os: windows-latest, name: scalafmt-x86_64-pc-win32 }
{ os: macOS-13, name: scalafmt-x86_64-apple-darwin.zip },
{ os: macOS-14, name: scalafmt-aarch64-apple-darwin.zip },
{ os: ubuntu-latest, name: scalafmt-x86_64-pc-linux.zip },
{ os: ubuntu-24.04-arm, name: scalafmt-aarch64-pc-linux.zip },
{ os: windows-latest, name: scalafmt-x86_64-pc-win32.zip }
]
runs-on: ${{ matrix.deploy.os }}
env:
BINARY_NAME: ${{ (startsWith(matrix.deploy.os, 'windows') && 'scalafmt.exe') || 'scalafmt' }}
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -45,17 +43,23 @@ jobs:
- run: sbt scala-native
env:
CI: true
- name: Zip artifact for deployment
if: ${{ !startsWith(matrix.deploy.os, 'windows') }}
run: zip ${{ matrix.deploy.name }} scalafmt
- name: Zip artifact for deployment
if: ${{ startsWith(matrix.deploy.os, 'windows') }}
run: 7z a ${{ matrix.deploy.name }} scalafmt.exe
- uses: actions/upload-artifact@master
with:
name: ${{ matrix.deploy.name }}
path: ${{ env.BINARY_NAME }}
path: ${{ matrix.deploy.name }}
- name: Upload release to Github
uses: actions/upload-release-asset@v1.0.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{ env.BINARY_NAME }}
asset_path: ${{ matrix.deploy.name }}
asset_name: ${{ matrix.deploy.name }}
asset_content_type: application/zip
dockerize:
Expand Down

0 comments on commit 72b5b90

Please sign in to comment.