-
Notifications
You must be signed in to change notification settings - Fork 1
[ID-1226] rust crate publishing #30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
09b6763
680e725
eac9c13
c39cfc6
cd753ae
3a22dcb
70a41eb
b7e43e4
0b0388b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| name: Publish Rust Release | ||
|
|
||
| on: | ||
| pull_request: | ||
| types: [closed] | ||
| branches: | ||
| - main | ||
|
|
||
| permissions: | ||
| contents: write | ||
|
|
||
| jobs: | ||
| publish-rust: | ||
| if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'release') | ||
| runs-on: ubuntu-latest | ||
| environment: production | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v4 | ||
|
|
||
| - name: Setup Rust toolchain | ||
| uses: actions-rust-lang/setup-rust-toolchain@v1 | ||
| with: | ||
| toolchain: stable | ||
|
|
||
| - name: Ensure release version | ||
| id: version | ||
| run: | | ||
| VERSION=$(cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | select(.name=="idkit") | .version') | ||
| if [ -z "$VERSION" ]; then | ||
| echo "Could not find idkit crate in workspace" >&2 | ||
| exit 1 | ||
| fi | ||
| if echo "$VERSION" | grep -q "-"; then | ||
| echo "Version contains pre-release identifier ($VERSION); aborting publish." >&2 | ||
| exit 1 | ||
| fi | ||
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Run tests | ||
| run: cargo test -p idkit --all-features --no-default-features | ||
|
|
||
| - name: Publish crate to crates.io | ||
| run: cargo publish -p idkit --locked |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -8,7 +8,7 @@ This Swift SDK is a wrapper over the Rust core: | |
|
|
||
| ``` | ||
| ┌─────────────────────────────────────┐ | ||
| │ Rust Core (idkit-core) │ | ||
| │ Rust Core (idkit) │ | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. hmm shouldn't foreign bindings still inherit from idkit-core? so idkit-core (Rust package) -> idkit-js (with react), idkit-swift, idkit-kotlin
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. yeah it's just a naming thing, I made it |
||
| │ - All business logic │ | ||
| │ - Session management │ | ||
| │ - Constraints │ | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you probably also want to run tests with --no-default-features