Skip to content

Commit deb25c1

Browse files
committed
Correct CI
1 parent c81d913 commit deb25c1

2 files changed

Lines changed: 17 additions & 4 deletions

File tree

.github/workflows/Lint-and-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ jobs:
3838
run: rustup install stable
3939
working-directory: rust
4040
- name: Format check
41-
run: cargo fmt check
41+
run: cargo fmt --check
4242
working-directory: rust
4343
- name: Clippy
4444
run: cargo clippy -- --deny warnings

.github/workflows/release.yml

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Publish Python distribution to PyPI
1+
name: Publish
22
on: push
33
jobs:
44
py-build:
@@ -36,7 +36,7 @@ jobs:
3636
- name: install stable rust
3737
run: rustup install stable
3838
- name: Format check
39-
run: cargo fmt check
39+
run: cargo fmt --check
4040
- name: Clippy
4141
run: cargo clippy -- --deny warnings
4242
- name: Tests
@@ -71,11 +71,24 @@ jobs:
7171
uses: pypa/gh-action-pypi-publish@release/v1
7272
with:
7373
packages-dir: python/
74+
75+
publish-to-crates-io:
76+
name: >-
77+
Publish Rust distribution to crates.io
78+
runs-on: ubuntu-latest
79+
if: github.ref_type == 'tag'
80+
needs: [py-build, rust-build] # Don't publish anything until both python & rust builds pass...
81+
steps:
82+
- name: publish
83+
run: cargo publish --allow-dirty
84+
env:
85+
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
86+
7487
github-release:
7588
name: >-
7689
Sign the Python distribution with Sigstore
7790
and upload them to GitHub Release
78-
needs: [py-build, publish-to-pypi]
91+
needs: [py-build, publish-to-pypi, rust-build, publish-to-crates-io]
7992
runs-on: ubuntu-latest
8093

8194
permissions:

0 commit comments

Comments
 (0)