-
-
Notifications
You must be signed in to change notification settings - Fork 39
98 lines (92 loc) · 2.54 KB
/
Copy pathcd.yml
File metadata and controls
98 lines (92 loc) · 2.54 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: CD
on:
push:
# Pattern matched against refs/tags
tags:
- '*' # Push events to every tag not containing /
workflow_dispatch:
permissions: {}
jobs:
cargo_checks:
name: Cargo Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
components: rustfmt, clippy
- name: Check formatting
run: cargo fmt --check
- name: Clippy
run: cargo clippy --tests -- -D warnings
# TODO : wait for cargo-rdme to catch up with rustdoc
# - name: Install Cargo Rdme
# uses: taiki-e/install-action@v2
# with:
# tool: cargo-rdme
# - name: Check if the README is up to date.
# run: |
# cargo rdme --check
- name: Run tests
run: cargo test --features chrono,uuid,rust_decimal,time
test_examples:
name: Test Examples
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
example:
- bootstrap
- column_index_type
- column_order_and_visibility
- custom_renderers_svg
- custom_row_renderer
- editable
- generic
- getter
- i18n
- paginated_rest_datasource
- pagination
- selectable
- serverfn_sqlx
- simple
- tailwind
steps:
- uses: actions/checkout@v7
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
- name: Build example ${{ matrix.example }}
run: |
cd ${{ github.workspace }}/examples/${{ matrix.example }}/
cargo build
shell: bash
publish:
name: Publish
runs-on: ubuntu-latest
needs: [ cargo_checks, test_examples ]
permissions:
id-token: write
steps:
- uses: actions/checkout@v7
- name: Setup Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: nightly
- name: Publish crate leptos-struct-table
uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CRATES_TOKEN }}
- uses: CSchoel/release-notes-from-changelog@v1
- name: Create Release using GitHub CLI
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: >
gh release create
-d
-F RELEASE.md
-t "Version $RELEASE_VERSION"
${GITHUB_REF#refs/*/}