-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (48 loc) · 2.19 KB
/
deploy.yml
File metadata and controls
57 lines (48 loc) · 2.19 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Deploy
on:
release:
types: [ published ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
permissions: write-all
jobs:
deploy:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { os: windows-latest, target: 'x86_64-pc-windows-msvc', suffix: '-win-x86_64', extention: '.exe' }
- { os: macOS-latest, target: 'x86_64-apple-darwin', suffix: '-mac-x86_64', extention: '' }
- { os: ubuntu-latest, target: 'x86_64-unknown-linux-gnu', suffix: '-linux-x86_64', extention: '' }
- { os: ubuntu-latest, target: 'x86_64-unknown-linux-musl', suffix: '-linux-muls-x86_64', extention: '' }
# - { os: windows-latest, target: 'arch64-pc-windows-msvc', suffix: '-linux-win-arch64', extention: '.exe' }
# - { os: macOS-11, target: 'aarch64-apple-darwin', suffix: '-mac-arch64', extention: '' }
# - { os: ubuntu-latest, target: 'aarch64-unknown-linux-gnu', suffix: '-linux-arch64', extention: '' }
# - { os: ubuntu-latest, target: 'aarch64-unknown-linux-musl', suffix: '-linux-musl-arch64', extention: '' }
steps:
- name: Update Rust toolchain
run: rustup update
- name: Install cross
run: cargo install cross
- uses: actions/checkout@v6
- name: Build
run: cargo build --verbose --release
- name: Zip archive (Windows)
if: matrix.config.os == 'windows-latest'
run: |
cp target/release/csv2dynamodb${{ matrix.config.extention }} ./csv2dynamodb${{ matrix.config.extention }}
powershell Compress-Archive -Path ./csv2dynamodb${{ matrix.config.extention }} -DestinationPath csv2dynamodb${{ matrix.config.suffix }}.zip
- name: Zip archive (not Windows)
if: matrix.config.os != 'windows-latest'
run: |
cp target/release/csv2dynamodb${{ matrix.config.extention }} ./csv2dynamodb${{ matrix.config.extention }}
zip csv2dynamodb${{ matrix.config.suffix }}.zip csv2dynamodb${{ matrix.config.extention }}
- name: Release
uses: softprops/action-gh-release@v3
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
csv2dynamodb${{ matrix.config.suffix }}.zip
LICENSE