Skip to content

Commit b1b4390

Browse files
committed
Fix the windows package release
1 parent 36a655d commit b1b4390

1 file changed

Lines changed: 19 additions & 12 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 19 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ jobs:
2020
fail-fast: false
2121
matrix:
2222
config:
23-
- { os: windows-latest, target: 'x86_64-pc-windows-msvc', suffix: '-win-x86_64' }
24-
- { os: macOS-11, target: 'x86_64-apple-darwin', suffix: '-mac-x86_64' }
25-
- { os: ubuntu-20.04, target: 'x86_64-unknown-linux-gnu', suffix: '-linux-x86_64' }
26-
- { os: ubuntu-20.04, target: 'x86_64-unknown-linux-musl', suffix: '-linux-muls-x86_64' }
27-
# - { os: windows-latest, target: 'arch64-pc-windows-msvc', suffix: '-linux-muls-arch64' }
28-
# - { os: macOS-11, target: 'aarch64-apple-darwin', suffix: '-mac-arch64' }
29-
# - { os: ubuntu-20.04, target: 'aarch64-unknown-linux-gnu', suffix: '-linux-arch64' }
30-
# - { os: ubuntu-20.04, target: 'aarch64-unknown-linux-musl', suffix: '-linux-musl-arch64' }
23+
- { os: windows-latest, target: 'x86_64-pc-windows-msvc', suffix: '-win-x86_64', extention: '.exe' }
24+
- { os: macOS-11, target: 'x86_64-apple-darwin', suffix: '-mac-x86_64', extention: '' }
25+
- { os: ubuntu-20.04, target: 'x86_64-unknown-linux-gnu', suffix: '-linux-x86_64', extention: '' }
26+
- { os: ubuntu-20.04, target: 'x86_64-unknown-linux-musl', suffix: '-linux-muls-x86_64', extention: '' }
27+
# - { os: windows-latest, target: 'arch64-pc-windows-msvc', suffix: '-linux-win-arch64', extention: '.exe' }
28+
# - { os: macOS-11, target: 'aarch64-apple-darwin', suffix: '-mac-arch64', extention: '' }
29+
# - { os: ubuntu-20.04, target: 'aarch64-unknown-linux-gnu', suffix: '-linux-arch64', extention: '' }
30+
# - { os: ubuntu-20.04, target: 'aarch64-unknown-linux-musl', suffix: '-linux-musl-arch64', extention: '' }
3131

3232
steps:
3333
- name: Update Rust toolchain
@@ -37,11 +37,18 @@ jobs:
3737
- uses: actions/checkout@v2
3838
- name: Build
3939
run: cargo build --verbose --release
40-
- name: Zip archive
40+
41+
- name: Zip archive (Windows)
42+
if: matrix.config.os == 'windows-latest'
43+
run: |
44+
cp target/release/csv2dynamodb${{ matrix.config.extention }} ./csv2dynamodb${{ matrix.config.extention }}
45+
powershell Compress-Archive -Path ./csv2dynamodb${{ matrix.config.extention }} -DestinationPath csv2dynamodb${{ matrix.config.suffix }}.zip
46+
47+
- name: Zip archive (not Windows)
48+
if: matrix.config.os != 'windows-latest'
4149
run: |
42-
ls target/release/
43-
cp target/release/csv2dynamodb ./csv2dynamodb
44-
zip csv2dynamodb${{ matrix.config.suffix }}.zip csv2dynamodb
50+
cp target/release/csv2dynamodb${{ matrix.config.extention }} ./csv2dynamodb${{ matrix.config.extention }}
51+
zip csv2dynamodb${{ matrix.config.suffix }}.zip csv2dynamodb${{ matrix.config.extention }}
4552
4653
- name: Release
4754
uses: softprops/action-gh-release@v1

0 commit comments

Comments
 (0)