Skip to content

Commit d2f62c7

Browse files
authored
Merge pull request #7 from P2GX/add-ci-and-deploy-workflows
Add deploy and CI workflows
2 parents ea2e1df + 274798d commit d2f62c7

File tree

3 files changed

+54
-3
lines changed

3 files changed

+54
-3
lines changed

.github/workflows/ci.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: Run tests
2+
3+
on:
4+
push:
5+
branches: [ development ]
6+
pull_request:
7+
branches: [ master, development ]
8+
9+
jobs:
10+
run-tests:
11+
runs-on: ${{ matrix.os }}
12+
strategy:
13+
fail-fast: false
14+
matrix:
15+
os: [ubuntu-latest, macos-latest, windows-latest]
16+
toolchain: [stable]
17+
18+
steps:
19+
- uses: actions/checkout@v4
20+
21+
- name: Install ${{ matrix.toolchain }}
22+
uses: dtolnay/rust-toolchain@master
23+
with:
24+
toolchain: ${{ matrix.toolchain }}
25+
26+
- name: Run tests
27+
run: cargo test

.github/workflows/deploy.yml

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Deploy to Crates IO
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*' # Trigger the workflow when a tag starting with 'v' is pushed, like v1.0.0
7+
8+
jobs:
9+
deploy:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v5
15+
16+
- name: Setup Rust
17+
uses: actions-rust-lang/setup-rust-toolchain@v1
18+
with:
19+
toolchain: stable
20+
21+
- name: Deploy to Crates IO
22+
run: |
23+
cargo publish \
24+
--token ${{ secrets.CRATES_IO_TOKEN }}

Cargo.toml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
[package]
22
name = "dabuild"
3-
version = "0.2.1-dev0"
3+
version = "0.3.0"
44
description = "Access genome build metadata"
55
keywords = ["reference", "genome", "build", "bioinformatics"]
66
edition = "2021"
77

8-
homepage = "https://github.com/ielis/dabuild"
9-
repository = "https://github.com/ielis/dabuild"
8+
homepage = "https://github.com/P2GX/dabuild"
9+
repository = "https://github.com/P2GX/dabuild"
1010
readme = "README.md"
1111
license-file = "LICENSE"
1212

0 commit comments

Comments
 (0)