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
name: Release
on:
push:
tags:
env:
CARGO_TERM_COLOR: always
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Checkout agent-kit as sibling
run: git clone --depth 1 https://github.com/btakita/agent-kit.git ../agent-kit
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo clippy -- -D warnings
- run: cargo test
- name: Publish to crates.io
run: cargo publish --allow-dirty
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
binary:
runs-on: ubuntu-latest
needs: publish
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Checkout agent-kit as sibling
run: git clone --depth 1 https://github.com/btakita/agent-kit.git ../agent-kit
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- name: Build release binary
run: cargo build --release
- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create ${{ github.ref_name }} \
--generate-notes \
target/release/webmaster