Skip to content

Commit 278d2ef

Browse files
committed
ci: add build and release pipelines
1 parent ea1c1b1 commit 278d2ef

File tree

5 files changed

+95
-0
lines changed

5 files changed

+95
-0
lines changed

.editorconfig

+3
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,6 @@ end_of_line = lf
1010
charset = utf-8
1111
trim_trailing_whitespace = true
1212
insert_final_newline = true
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

.github/dependabot.yml

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
- package-ecosystem: "cargo"
8+
directory: "/"
9+
schedule:
10+
interval: "weekly"

.github/workflows/release-plz.yml

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Release-plz
2+
3+
permissions:
4+
pull-requests: write
5+
contents: write
6+
7+
on:
8+
push:
9+
branches:
10+
- main
11+
12+
jobs:
13+
# Release unpublished packages.
14+
release-plz-release:
15+
name: Release-plz release
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Checkout repository
19+
uses: actions/checkout@v4
20+
with:
21+
fetch-depth: 0
22+
- name: Install Rust toolchain
23+
uses: dtolnay/rust-toolchain@stable
24+
- name: Run release-plz
25+
uses: release-plz/action@v0.5
26+
with:
27+
command: release
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
31+
32+
# Create a PR with the new versions and changelog, preparing the next release.
33+
release-plz-pr:
34+
name: Release-plz PR
35+
runs-on: ubuntu-latest
36+
concurrency:
37+
group: release-plz-${{ github.ref }}
38+
cancel-in-progress: false
39+
steps:
40+
- name: Checkout repository
41+
uses: actions/checkout@v4
42+
with:
43+
fetch-depth: 0
44+
- name: Install Rust toolchain
45+
uses: dtolnay/rust-toolchain@stable
46+
- name: Run release-plz
47+
uses: release-plz/action@v0.5
48+
with:
49+
command: release-pr
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
52+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

.github/workflows/rust.yml

+18
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: Rust
2+
on:
3+
- push
4+
- pull_request
5+
6+
env:
7+
CARGO_TERM_COLOR: always
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
- name: Build
16+
run: cargo build --verbose
17+
- name: Run tests
18+
run: cargo test --verbose

.pre-commit-config.yaml

+12
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v5.0.0
4+
hooks:
5+
- id: end-of-file-fixer
6+
- id: trailing-whitespace
7+
- repo: https://github.com/compilerla/conventional-pre-commit
8+
rev: v3.6.0
9+
hooks:
10+
- id: conventional-pre-commit
11+
stages: [commit-msg]
12+
args: []

0 commit comments

Comments
 (0)