@@ -23,15 +23,13 @@ jobs:
23
23
fail-fast : false
24
24
matrix :
25
25
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 }
31
31
]
32
32
runs-on : ${{ matrix.deploy.os }}
33
- env :
34
- BINARY_NAME : ${{ (startsWith(matrix.deploy.os, 'windows') && 'scalafmt.exe') || 'scalafmt' }}
35
33
steps :
36
34
- uses : actions/checkout@v4
37
35
with :
@@ -45,17 +43,23 @@ jobs:
45
43
- run : sbt scala-native
46
44
env :
47
45
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
48
52
- uses : actions/upload-artifact@master
49
53
with :
50
54
name : ${{ matrix.deploy.name }}
51
- path : ${{ env.BINARY_NAME }}
55
+ path : ${{ matrix.deploy.name }}
52
56
- name : Upload release to Github
53
57
54
58
env :
55
59
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
56
60
with :
57
61
upload_url : ${{ github.event.release.upload_url }}
58
- asset_path : ${{ env.BINARY_NAME }}
62
+ asset_path : ${{ matrix.deploy.name }}
59
63
asset_name : ${{ matrix.deploy.name }}
60
64
asset_content_type : application/zip
61
65
dockerize :
0 commit comments