Skip to content

Commit f6ba6e5

Browse files
authored
build: set up publish to crates.io (#374)
* build: add description field to Cargo.toml Signed-off-by: Luka Peschke <luka.peschke@toucantoco.com> * build: add crates.io publish to CI Signed-off-by: Luka Peschke <luka.peschke@toucantoco.com> --------- Signed-off-by: Luka Peschke <luka.peschke@toucantoco.com>
1 parent 3f1f82e commit f6ba6e5

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/release.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,14 @@ jobs:
9393
name: Release
9494
runs-on: ubuntu-latest
9595
needs: [linux, macos, windows, sdist]
96+
permissions:
97+
id-token: write # Required for OIDC token exchange with crates.io
9698
steps:
99+
- uses: actions/checkout@v5
97100
- uses: dtolnay/rust-toolchain@stable
101+
- uses: rust-lang/crates-io-auth-action@v1
102+
id: auth
103+
98104
- name: Download Linux 3.9 wheels for x86-64
99105
uses: actions/download-artifact@v5
100106
with:
@@ -131,7 +137,6 @@ jobs:
131137
name: "sdist"
132138
path: sdist
133139

134-
135140
- name: Publish to PyPI
136141
uses: PyO3/maturin-action@v1
137142
env:
@@ -140,6 +145,11 @@ jobs:
140145
command: upload
141146
args: "--skip-existing wheels-linux/*.whl wheels-macos/*.whl wheels-windows/*.whl sdist/*.tar.gz"
142147

148+
- name: Publish to crates.io
149+
run: cargo publish
150+
env:
151+
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
152+
143153
- name: Release
144154
uses: softprops/action-gh-release@v2
145155
with:

Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[package]
22
name = "fastexcel"
33
version = "0.15.0"
4+
description = "A fast excel reader for Rust and Python"
45
rust-version = "1.85.0"
56
edition = "2024"
67
license = "MIT"

0 commit comments

Comments
 (0)