Skip to content

Commit 4eae097

Browse files
committed
Add GitHub Actions for build artifacts
1 parent d85ed13 commit 4eae097

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

.github/workflows/build.yml

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
on: [push, pull_request]
2+
3+
name: Actions - build
4+
5+
jobs:
6+
build:
7+
runs-on: ${{ matrix.os }}
8+
strategy:
9+
matrix:
10+
os: [macOS-10.14, ubuntu-18.04]
11+
fail-fast: false
12+
steps:
13+
- uses: actions/checkout@v1
14+
- uses: actions-rs/toolchain@v1
15+
with:
16+
toolchain: 1.37.0
17+
override: true
18+
- run: cargo fetch --verbose
19+
- run: cargo build --release
20+
- name: Archive
21+
working-directory: target/release
22+
run: |
23+
echo ${{github.sha}} ${{github.ref}} | tee git-ref
24+
shasum -a 256 codechain | tee sha256sums
25+
mkdir codechain-${{matrix.os}}-${{github.sha}}
26+
mv codechain git-ref sha256sums codechain-${{matrix.os}}-${{github.sha}}
27+
- uses: actions/upload-artifact@v1
28+
with:
29+
name: codechain-${{matrix.os}}-${{github.sha}}
30+
path: target/release/codechain-${{matrix.os}}-${{github.sha}}

0 commit comments

Comments
 (0)