Skip to content

Commit c8444a1

Browse files
committed
attempt
1 parent 7a25198 commit c8444a1

4 files changed

Lines changed: 12 additions & 14 deletions

File tree

.github/workflows/publish.yml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,14 @@ env:
99
CARGO_TERM_COLOR: always
1010

1111
jobs:
12+
# Run all tests first using the reusable workflow
13+
tests:
14+
uses: ./.github/workflows/tests.yml
15+
16+
# Publish job that depends on tests passing
1217
publish:
1318
name: Publish to crates.io
19+
needs: tests
1420
runs-on: ubuntu-latest
1521
environment: publish
1622

@@ -44,15 +50,6 @@ jobs:
4450
4551
echo "Version check passed!"
4652
47-
- name: Run tests
48-
run: cargo test --verbose
49-
50-
- name: Run clippy
51-
run: cargo clippy --all-targets -- -D warnings
52-
53-
- name: Check formatting
54-
run: cargo fmt -- --check
55-
5653
- name: Build release
5754
run: cargo build --release --verbose
5855

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ on:
55
branches:
66
- main
77
pull_request:
8+
workflow_call:
89

910
env:
1011
CARGO_TERM_COLOR: always

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -189,13 +189,13 @@ Releases are automated through GitHub Actions when a version tag is pushed. The
189189
git push origin v0.2.0
190190
```
191191

192-
4. **Automated publish workflow**
192+
4. **Automated release workflow**
193193
- The GitHub Actions workflow will automatically:
194-
- Verify the tag version matches Cargo.toml
195-
- Run all tests
194+
- Run all tests (macOS, Linux, weak mode)
196195
- Run clippy and format checks
196+
- Verify the tag version matches Cargo.toml
197197
- Build the release binary
198-
- Publish to crates.io
198+
- Publish to crates.io (only if all tests pass)
199199

200200
### Prerequisites for Publishing
201201

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)