Skip to content

Commit 5682471

Browse files
committed
chore: setup project [skip ci]
1 parent 3d13cf4 commit 5682471

File tree

5 files changed

+130
-1
lines changed

5 files changed

+130
-1
lines changed

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
on:
3+
push:
4+
branches:
5+
- main
6+
- alpha
7+
- beta
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
release:
14+
name: Release
15+
runs-on: ubuntu-latest
16+
steps:
17+
- uses: actions/checkout@v2
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v1
20+
with:
21+
node-version: 16
22+
- name: Install npm dependencies
23+
run: |
24+
npm install -g \
25+
semantic-release@18 \
26+
@semantic-release/[email protected] \
27+
28+
@semantic-release/[email protected] \
29+
@semantic-release/[email protected]
30+
- name: Test
31+
run: cargo build --verbose && cargo test --verbose
32+
- name: Release
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
36+
GIT_AUTHOR_NAME: EqualMa
37+
GIT_AUTHOR_EMAIL: [email protected]
38+
run: semantic-release

.github/workflows/rust.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Rust
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
7+
env:
8+
CARGO_TERM_COLOR: always
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
- name: Build
17+
run: cargo build --verbose
18+
- name: Run tests
19+
run: cargo test --verbose

.releaserc.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
branches:
2+
- "+([0-9])?(.{+([0-9]),x}).x"
3+
- main
4+
- next
5+
- next-major
6+
- name: beta
7+
prerelease: true
8+
- name: alpha
9+
prerelease: true
10+
plugins:
11+
- "@semantic-release/commit-analyzer"
12+
- "@semantic-release/release-notes-generator"
13+
- "@semantic-release/changelog"
14+
- - "@google/semantic-release-replace-plugin"
15+
- replacements:
16+
- files:
17+
- Cargo.toml
18+
from: 'version = ".*" # replace version'
19+
to: 'version = "${nextRelease.version}" # replace version'
20+
results:
21+
- file: Cargo.toml
22+
hasChanged: true
23+
numMatches: 1
24+
numReplacements: 1
25+
countMatches: true
26+
- - "@semantic-release/exec"
27+
- publishCmd: cargo publish
28+
- - "@semantic-release/git"
29+
- assets:
30+
- CHANGELOG.md
31+
- Cargo.toml
32+
- "@semantic-release/github"

Cargo.toml

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,27 @@
11
[package]
22
name = "react-sys"
3-
version = "0.1.0"
3+
version = "0.1.0" # replace version
44
edition = "2018"
5+
description = "React bindings for rust"
6+
license = "MIT"
7+
authors = [
8+
"Equal Ma <[email protected]>",
9+
]
10+
homepage = "https://github.com/frender-rs/react-sys"
11+
repository = "https://github.com/frender-rs/react-sys"
12+
categories = [
13+
"wasm",
14+
"api-bindings",
15+
"gui",
16+
]
17+
keywords = [
18+
"react",
19+
"wasm",
20+
"web",
21+
"ui",
22+
"js",
23+
"bindgen",
24+
]
525

626
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
727

README.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# react-sys
2+
3+
[![Crates.io](https://img.shields.io/crates/v/react-sys?style=for-the-badge)](https://crates.io/crates/react-sys)
4+
[![docs.rs](https://img.shields.io/docsrs/react-sys/latest?style=for-the-badge)](https://docs.rs/react-sys)
5+
[![GitHub license](https://img.shields.io/github/license/frender-rs/react-sys?style=for-the-badge)](https://github.com/frender-rs/react-sys/blob/main/LICENSE)
6+
[![GitHub stars](https://img.shields.io/github/stars/frender-rs/react-sys?style=for-the-badge)](https://github.com/frender-rs/react-sys/stargazers)
7+
8+
Globally and safely persist a value, implemented with `ManuallyDrop`.
9+
10+
# Install
11+
12+
`Cargo.toml`
13+
14+
```toml
15+
react-sys = "1"
16+
```
17+
18+
# Docs
19+
20+
Please see [docs.rs](https://docs.rs/react-sys)

0 commit comments

Comments
 (0)