Skip to content

Commit 0f94eb7

Browse files
committed
Add ci and publish workflows
1 parent 7b01615 commit 0f94eb7

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @sytten

.github/workflows/ci.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: CI
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
8+
concurrency:
9+
group: ci-${{ github.ref_name }}
10+
cancel-in-progress: true
11+
12+
jobs:
13+
ci:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
18+
- name: Setup Rust
19+
uses: dtolnay/rust-toolchain@315e265cd78dad1e1dcf3a5074f6d6c47029d5aa
20+
with:
21+
toolchain: stable
22+
components: rustfmt, clippy
23+
24+
- name: Format
25+
run: cargo fmt --all -- --check
26+
27+
- name: Clippy
28+
run: cargo clippy --all-features -- -D warnings
29+
30+
- name: Test
31+
run: cargo test

.github/workflows/publish.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Publish
2+
on:
3+
push:
4+
tags:
5+
- 'v[0-9]+.[0-9]+.[0-9]+*'
6+
7+
jobs:
8+
publish:
9+
if: github.repository == 'rquickjs/rquickjs-serde'
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout repository
13+
uses: actions/checkout@v4
14+
15+
- name: Setup Rust
16+
uses: dtolnay/rust-toolchain@a54c7afa936fefeb4456b2dd8068152669aa8203
17+
with:
18+
toolchain: stable
19+
20+
- name: Publish crates
21+
uses: katyo/publish-crates@02cc2f1ad653fb25c7d1ff9eb590a8a50d06186b
22+
with:
23+
registry-token: ${{ secrets.CRATES_TOKEN }}

0 commit comments

Comments
 (0)