-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (38 loc) · 1.22 KB
/
release_test.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
48
name: ReleaseTest
on:
pull_request:
branches: [release]
types: [opened, synchronize]
env:
CARGO_TERM_COLOR: always
jobs:
publish:
runs-on: ubuntu-latest
permissions: write-all
steps:
- uses: actions/checkout@v3
- name: Extract version
id: extract-version
run: echo "VERSION=$(grep -oP '^version = "\K[^"]+' Cargo.toml | awk '{$1=$1;print}')" >> $GITHUB_OUTPUT
- name: Cache restore
uses: actions/cache/restore@v3
id: cache-cargo-restore
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ steps.extract-version.outputs.VERSION }}
- name: Run clippy
run: cargo clippy --all-features --all-targets -- -D warnings
- name: Run all tests with default features
run: cargo test
- name: Run tests with all features
run: cargo test --all-features
- name: publish crates dry run
run: |
cargo login ${{ secrets.crates_io }}
cargo publish -p encrypt_config --dry-run
cargo publish -p encrypt_config_derive --dry-run