-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (47 loc) · 1.45 KB
/
release-please.yml
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
46
47
on:
push:
branches:
- alpha
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Test
run: |
cargo fmt --all --check
cargo check --locked --all-targets --all-features
cargo clippy --locked --all-targets --all-features -- --deny warnings
cargo test -p hooks-core
bash scripts/test-hooks.sh
cargo test -p hooks-test
cargo test
cargo test --all-features
- uses: googleapis/release-please-action@v4
id: release
with:
target-branch: alpha
- name: Publish
run: |
for dir_path in $PATHS_RELEASED
do
if [[ $dir_path -ef packages/hooks-test ]]; then
continue
fi
echo "publish $dir_path/Cargo.toml"
cargo publish --manifest-path "$dir_path/Cargo.toml"
done
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
PATHS_RELEASED: ${{ join(fromJSON(steps.release.outputs.paths_released || '[]'), ' ') }}
if: ${{ steps.release.outputs.releases_created }}