+35
.github/workflows/ci.yml
+35
.github/workflows/ci.yml
···
1
+
name: ci
2
+
on:
3
+
release:
4
+
types: [created]
5
+
6
+
jobs:
7
+
deploy:
8
+
runs-on: ubuntu-latest
9
+
steps:
10
+
- uses: actions/checkout@v2
11
+
- name: Setup Fluent CI
12
+
uses: fluentci-io/setup-fluentci@v5
13
+
with:
14
+
wasm: true
15
+
plugin: rust
16
+
args: |
17
+
build --release
18
+
- name: Set env
19
+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
20
+
- name: Create assets
21
+
run: |
22
+
cd target/release
23
+
tar czvf replay_${RELEASE_VERSION}_x86_64-unknown-linux-gnu.tar.gz replay
24
+
sha256sum replay_${RELEASE_VERSION}_x86_64-unknown-linux-gnu.tar.gz > replay_${RELEASE_VERSION}_x86_64-unknown-linux-gnu.tar.gz.sha256
25
+
- name: Upload assets
26
+
run: |
27
+
cd target/release
28
+
for ext in tar.gz tar.gz.sha256; do
29
+
export FILE=replay_${{ env.RELEASE_VERSION }}_x86_64-unknown-linux-gnu.$ext
30
+
fluentci run --wasm github release_upload $TAG $FILE
31
+
done
32
+
env:
33
+
TAG: ${{ env.RELEASE_VERSION }}
34
+
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35
+
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+1
-1
src/main.rs
+1
-1
src/main.rs
···
23
23
Sniff and replay HTTP requests and responses — perfect for mocking APIs during testing.
24
24
"#;
25
25
let matches = Command::new("replay")
26
-
.version("0.1.0")
26
+
.version(env!("CARGO_PKG_VERSION"))
27
27
.author("Tsiry Sandratraina <tsiry.sndr@rocksky.app>")
28
28
.about(&format!("{}", BANNER.magenta()))
29
29
.arg(