Skip to content

Commit

Permalink
Add zip commands for different platforms (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zel9278 authored Jan 21, 2024
1 parent 97eb5aa commit 40f1bc6
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,14 @@ jobs:
- uses: Swatinem/rust-cache@23bce251a8cd2ffc3c1075eaa2367cf899916d84 # v2.7.3
with:
key: ${{ matrix.target }}
- name: Install cross
if: ${{ !matrix.os && matrix.use-cross }}
uses: taiki-e/install-action@3ed9916b5427bc0679b294607ea47d1d8007b53f # v2.25.7
with:
tool: cross
- name: Bundle Assets and binary to zipping
- name: zip for linux and apple
if: matrix.target != 'x86_64-unknown-linux-gnu' || matrix.target != 'x86_64-apple-darwin' || matrix.target != 'aarch64-apple-darwin'
run: |
zip target/${{ matrix.target }}.zip target/${{ matrix.target }}/release/jbox.exe -r assets
- name: zip for windows
if: matrix.target == 'x86_64-pc-windows-msvc' || matrix.target == 'x86_64-pc-windows-gnu'
run: |
mkdir -p target/${{ matrix.target }}/release
cp -r assets target/${{ matrix.target }}/release/
zip -r target/${{ matrix.target }}.zip target/${{ matrix.target }}/release
powershell compress-archive -Path target/${{ matrix.target }}/release/jbox.exe -Path assets/ -DestinationPath target/${{ matrix.target }}.zip
- run: ${{ (!matrix.os && matrix.use-cross) && 'cross' || 'cargo' }} build --locked --release --target ${{ matrix.target }}
- uses: actions/upload-artifact@694cdabd8bdb0f10b2cea11669e1bf5453eed0a6 # v4.2.0
with:
Expand Down

0 comments on commit 40f1bc6

Please sign in to comment.