Skip to content

Commit

Permalink
artifact renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
kayhhh committed Sep 18, 2024
1 parent 451cc71 commit 0da6755
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 10 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/build-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
strategy:
matrix:
package: [unavi-app, unavi-server]
name: ${{ matrix.package }}.x86_64-windows
name: ${{ matrix.package }}-windows
steps:
- uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -49,21 +49,21 @@ jobs:
UNAVI_REGISTRY_DID: ${{ inputs.channel == 'stable' && 'app' || inputs.channel }}.unavi.xyz

- name: Create zip
run: Compress-Archive -Path result/* -DestinationPath ${{ matrix.package }}.x86_64-windows.zip
run: Compress-Archive -Path result/* -DestinationPath ${{ matrix.package }}-windows.zip

- name: Create msi
run: |
ls target/wix/
mv target/wix/*.msi ${{ matrix.packages }}.x86-64_windows.msi
mv target/wix/*.msi ${{ matrix.packages }}-windows.msi
- uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.package }}.x86_64-windows
path: ${{ matrix.package }}.x86_64-windows.zip
name: build-${{ matrix.package }}-windows
path: ${{ matrix.package }}-windows.zip
retention-days: 1

- uses: actions/upload-artifact@v4
with:
name: build-installer-${{ matrix.package }}.x86_64-windows
path: ${{ matrix.package }}.x86_64-windows.msi
name: build-installer-${{ matrix.package }}-windows
path: ${{ matrix.package }}-windows.msi
retention-days: 1
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ jobs:
for file in *; do
ext="${file##*.}"
name="${file%.*}"
mv "$file" "../${name}.${{ needs.version.outputs.version }}.$ext"
mv "$file" "../${name}-${{ needs.version.outputs.version }}.$ext"
done
cd ..
Expand Down
6 changes: 4 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,11 @@
package = nixpkgs.lib.strings.removeSuffix "\"" (
nixpkgs.lib.strings.removePrefix "\"" (builtins.elemAt split 1)
);
platform = builtins.elemAt split 0;
platformSplit = nixpkgs.lib.strings.splitString "-" (builtins.elemAt split 0);
platformRaw = builtins.elemAt platformSplit 1;
platform = if platformRaw == "darwin" then "macos" else platformRaw;
in
entry // { name = "${package}.${platform}"; }
entry // { name = "${package}-${platform}"; }
) githubMatrix.matrix.include;
};
}
Expand Down

0 comments on commit 0da6755

Please sign in to comment.