Skip to content

Commit 3e2c453

Browse files
authored
Add release build workflow (#3)
1 parent 9726bf5 commit 3e2c453

2 files changed

Lines changed: 62 additions & 2 deletions

File tree

.github/workflows/build.yml

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Rust
1+
name: Build
22

33
on:
44
pull_request:
@@ -10,11 +10,35 @@ env:
1010
jobs:
1111
build:
1212

13-
runs-on: ubuntu-latest
13+
runs-on: ${{ matrix.config.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
config:
18+
- { os: windows-latest, target: 'x86_64-pc-windows-msvc' }
19+
- { os: macOS-11, target: 'x86_64-apple-darwin' }
20+
- { os: ubuntu-20.04, target: 'x86_64-unknown-linux-gnu' }
21+
- { os: ubuntu-20.04, target: 'x86_64-unknown-linux-musl' }
22+
# strategy:
23+
# matrix:
24+
# target: [
25+
# x86_64-pc-windows-msvc,
26+
# x86_64-apple-darwin,
27+
# x86_64-unknown-linux-gnu,
28+
# x86_64-unknown-linux-musl,
29+
# # aarch64-pc-windows-msvc,
30+
# # aarch64-apple-darwin,
31+
# # aarch64-unknown-linux-gnu,
32+
# # aarch64-unknown-linux-musl
33+
# ]
1434

1535
steps:
36+
- name: Add cross build targets
37+
run: rustup target add ${{ matrix.config.target }}
1638
- name: Update Rust toolchain
1739
run: rustup update
40+
- name: Install cross
41+
run: cargo install cross
1842
- uses: actions/checkout@v2
1943
- name: Build
2044
run: cargo build --verbose

.github/workflows/deploy.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Deploy
2+
3+
on:
4+
release:
5+
types: [ published ]
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
build:
12+
13+
runs-on: ${{ matrix.config.os }}
14+
strategy:
15+
fail-fast: false
16+
matrix:
17+
config:
18+
- { os: windows-latest, target: 'x86_64-pc-windows-msvc' }
19+
- { os: macOS-11, target: 'x86_64-apple-darwin' }
20+
- { os: ubuntu-20.04, target: 'x86_64-unknown-linux-gnu' }
21+
- { os: ubuntu-20.04, target: 'x86_64-unknown-linux-musl' }
22+
23+
steps:
24+
- name: Update Rust toolchain
25+
run: rustup update
26+
- name: Install cross
27+
run: cargo install cross
28+
- uses: actions/checkout@v2
29+
- name: Build
30+
run: cargo build --verbose --release
31+
32+
- name: Archive Artifacts
33+
uses: actions/upload-artifact@v2
34+
with:
35+
name: "App-Artifacts"
36+
path: target/release/csv2dynamodb

0 commit comments

Comments
 (0)