Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file modified .DS_Store
Binary file not shown.
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
- "--no-default-features"
- "--no-default-features --features auth"
- "--no-default-features --features cloudkit"
- "--no-default-features --features appstore"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -49,6 +50,7 @@ jobs:
- "--no-default-features"
- "--no-default-features --features auth"
- "--no-default-features --features cloudkit"
- "--no-default-features --features appstore"
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
Expand All @@ -66,3 +68,4 @@ jobs:
- run: cargo check --no-default-features
- run: cargo check --no-default-features --features auth
- run: cargo check --no-default-features --features cloudkit
- run: cargo check --no-default-features --features appstore
64 changes: 64 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
name: Release

on:
push:
tags:
- "v*"

env:
CARGO_TERM_COLOR: always

jobs:
validate:
name: Validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
with:
components: clippy
- uses: Swatinem/rust-cache@v2
- run: cargo fmt --all -- --check
- run: cargo clippy --all-features --tests -- -D warnings
- run: cargo test --all-features

publish:
name: Publish to crates.io
needs: validate
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@stable
- uses: Swatinem/rust-cache@v2
- run: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}

github-release:
name: GitHub Release
needs: publish
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Generate release notes
id: notes
run: |
TAG=${GITHUB_REF#refs/tags/}
PREV_TAG=$(git tag --sort=-v:refname | grep -A1 "^${TAG}$" | tail -1)
if [ -z "$PREV_TAG" ] || [ "$PREV_TAG" = "$TAG" ]; then
echo "body=Initial release" >> "$GITHUB_OUTPUT"
else
NOTES=$(git log "${PREV_TAG}..${TAG}" --pretty=format:"- %s" --no-merges)
EOF=$(dd if=/dev/urandom bs=15 count=1 status=none | base64)
echo "body<<$EOF" >> "$GITHUB_OUTPUT"
echo "$NOTES" >> "$GITHUB_OUTPUT"
echo "$EOF" >> "$GITHUB_OUTPUT"
fi
- uses: softprops/action-gh-release@v2
with:
body: ${{ steps.notes.outputs.body }}
generate_release_notes: false
67 changes: 67 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 4 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,18 @@
name = "apple"
version = "0.2.0"
edition = "2024"
description = "A Rust library for Apple Sign-In authentication and CloudKit Web Services"
description = "A Rust library for Apple Sign-In authentication, CloudKit Web Services, and App Store Server API"
license = "MIT"
repository = "https://github.com/meszmate/apple-rs"
readme = "README.md"
keywords = ["apple", "authentication", "cloudkit", "sign-in", "jwt"]
keywords = ["apple", "authentication", "cloudkit", "appstore", "jwt"]
categories = ["authentication", "api-bindings"]

[features]
default = ["auth", "cloudkit"]
auth = []
cloudkit = ["sha2", "chrono"]
appstore = ["chrono", "x509-cert"]

[dependencies]
reqwest = { version = "0.12", features = ["json"] }
Expand All @@ -26,6 +27,7 @@ serde_json = "1.0"
futures = "0.3"
sha2 = { version = "0.10", optional = true }
chrono = { version = "0.4", optional = true }
x509-cert = { version = "0.2", optional = true }

[dev-dependencies]
tokio = { version = "1", features = ["macros", "rt-multi-thread"] }
Loading