Skip to content

Commit 99ee311

Browse files
committed
chore: merge CI and publish workflows
1 parent f5f8676 commit 99ee311

2 files changed

Lines changed: 19 additions & 18 deletions

File tree

.github/workflows/ci.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
name: CI
22

3-
on: [push, pull_request]
3+
on:
4+
push:
5+
branches: [ main ]
6+
tags: [ 'v*' ]
7+
pull_request:
8+
branches: [ main ]
49

510
env:
611
CARGO_TERM_COLOR: never
@@ -22,3 +27,16 @@ jobs:
2227
run: cargo clippy --workspace --all-targets -- -D warnings
2328
- name: check
2429
run: cargo check --workspace --all-targets
30+
31+
publish:
32+
name: Publish to crates.io
33+
needs: validate
34+
if: startsWith(github.ref, 'refs/tags/v')
35+
runs-on: ubuntu-latest
36+
steps:
37+
- uses: actions/checkout@v4
38+
- uses: dtolnay/rust-toolchain@stable
39+
- name: Publish teamtalk
40+
run: |
41+
cd crates/teamtalk
42+
cargo publish --token ${{ secrets.CRATES_IO_TOKEN }}

.github/workflows/publish.yml

Lines changed: 0 additions & 17 deletions
This file was deleted.

0 commit comments

Comments
 (0)