Skip to content

Commit

Permalink
Add CD
Browse files Browse the repository at this point in the history
  • Loading branch information
MCOfficer committed Apr 1, 2020
1 parent a16b21b commit 84a8557
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: CD

on:
push:
tags:
- "v*.*.*"

env:
target: x86_64-unknown-linux-musl

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Install musl
run: sudo apt-get update && sudo apt-get install -y musl musl-tools
- name: Install Rust
uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: ${{ env.target }}
default: true
- name: Build
uses: actions-rs/cargo@v1
with:
command: build
args: --release --target ${{ env.target }}
- name: Strip binary
run: strip ./target/${{ env.target }}/release/container-stats
- name: Move binary
run: mv target/${{ env.target }}/release/container-stats container-stats-${{ env.target }}
- name: Upload binary
uses: softprops/action-gh-release@v1
with:
files: |
container-stats-${{ env.target }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 84a8557

Please sign in to comment.