-
-
Notifications
You must be signed in to change notification settings - Fork 8
129 lines (111 loc) · 3.19 KB
/
core.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
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
name: Core
on:
push:
branches: [master]
pull_request: {}
permissions:
contents: read
env:
CARGO_INCREMENTAL: 0
RUSTFLAGS: --deny warnings
jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Init toolchain
uses: alorel-actions/cargo/init@v1
with:
components: rustfmt,clippy
cache-prefix: lint
local: true
- name: Fmt
run: cargo fmt --check
- name: Clippy
run: cargo clippy --locked --tests
- name: Doc
run: cargo doc --locked --no-deps && rm -rf target/doc
- name: cargo-rdme
uses: alorel-actions/cargo/rdme@v1
with:
intralinks-strip-links: true
test:
name: Test on ${{matrix.toolchain}}
runs-on: ubuntu-latest
strategy:
matrix:
toolchain:
- nightly-2023-10-28
- stable
- 1.70.0
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Init toolchain
uses: alorel-actions/cargo/init@v1
with:
toolchain: ${{matrix.toolchain}}
cache-prefix: test
local: true
- name: Install wasm-pack
uses: alorel-actions/cargo-global-dep@v1
with:
name: wasm-pack
version: 0.12.1
- name: Test (no features)
run: wasm-pack test --headless --firefox --chrome --locked --no-default-features
- name: Test (default features)
run: wasm-pack test --headless --firefox --chrome --locked
- name: Test (nightly)
run: wasm-pack test --headless --firefox --chrome --locked --all-features
if: ${{startsWith(matrix.toolchain, 'nightly')}}
release:
name: Release
runs-on: ubuntu-latest
if: ${{ github.ref == 'refs/heads/master' }}
needs:
- lint
- test
permissions:
contents: write
steps:
- uses: actions/checkout@v4
name: Checkout
with:
fetch-depth: 0
fetch-tags: true
token: ${{ secrets.GH_TOKEN }}
- name: Parse
id: parse
uses: alorel-actions/semantic-release-lite@v0
with:
stay-at-zero: true
minor-types: |
feat: Features
patch-types: |
fix: Bug Fixes
trivial-types: |
chore: Maintenance
deps: Dependency updates
ci: CI & Build
build: CI & Build
refactor: Refactors
docs: Documentation
perf: Performance
- name: Prep release
if: ${{ steps.parse.outputs.should-release }}
id: prep
uses: ./.github/actions/prep-release
with:
release-type: ${{ steps.parse.outputs.release-type }}
version: ${{ steps.parse.outputs.next-version }}
- name: Release
if: ${{ steps.prep.outputs.in-sync }}
uses: ./.github/actions/release
with:
version: ${{ steps.parse.outputs.next-version }}
changelog: ${{ steps.parse.outputs.changelog }}
issues-closed: ${{ steps.parse.outputs.issues-closed }}
crates-io-token: ${{ secrets.CRATES_IO_TOKEN }}