Skip to content

Commit 2c0bb85

Browse files
authored
Add GitHub Actions [cargo publish, release note, rust] (#44)
* add: publish * add: release.yml * update: release.yml * update: rust.yml
1 parent 2012250 commit 2c0bb85

File tree

3 files changed

+60
-2
lines changed

3 files changed

+60
-2
lines changed

.github/release.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
changelog:
2+
categories:
3+
- title: 🚀 New Features
4+
labels:
5+
- feature
6+
- title: 📄 New Documentation
7+
labels:
8+
- documentation
9+
- title: 🐛 Bug Fixes
10+
labels:
11+
- bug
12+
- title: 🔧 Refactoring
13+
labels:
14+
- refactor
15+
- title: ✅ Changes to GitHub Actions
16+
labels:
17+
- actions
18+
- title: 🎉 Changes for Release
19+
labels:
20+
- release
21+
- title: Other Changes
22+
labels:
23+
- "*"

.github/workflows/publish.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: cargo publish
2+
3+
on:
4+
release:
5+
types:
6+
- published
7+
8+
jobs:
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- uses: actions/checkout@v2
14+
15+
- name: login
16+
run: cargo login ${{ secrets.CARGO_TOKEN }}
17+
18+
- name: publish
19+
run: cargo publish

.github/workflows/rust.yml

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@ name: Rust
22

33
on:
44
pull_request:
5-
branches:
6-
- develop
5+
paths:
6+
- .github/workflows/rust.yml
7+
- "**.toml"
8+
- "**.rs"
9+
710
push:
811
branches:
912
- develop
13+
paths:
14+
- .github/workflows/rust.yml
15+
- "**.toml"
16+
- "**.rs"
1017

1118
jobs:
1219
build:
@@ -37,3 +44,12 @@ jobs:
3744
- name: Run tests
3845
run: cargo test --verbose --tests
3946
continue-on-error: ${{ matrix.rust == 'nightly' }}
47+
48+
- name: Build for examples
49+
run: cargo build --verbose
50+
working-directory: examples
51+
52+
- name: Run tests for examples
53+
run: cargo test --verbose --tests
54+
continue-on-error: ${{ matrix.rust == 'nightly' }}
55+
working-directory: examples

0 commit comments

Comments
 (0)