Author SHA1 Message Date
chrnx a273c249c3 ci: publish to crates.io via OIDC Trusted Publishing (no token)
CI / check (pull_request) Successful in 27s
Replaces CARGO_TOKEN with crates.io Trusted Publishing: id-token: write + rust-lang/crates-io-auth-action exchanges the OIDC token for a short-lived crates.io token. Requires a trusted publisher configured on crates.io (Expressive-Tea/matcha, release.yml).

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-18 14:54:25 -05:00
chrnx 2f74cd8d9b Merge pull request 'feat: matcha-cli crate + two-forge CI/CD' (#4) from feat/ci-cargo-crates into develop
CI / check (push) Successful in 47s
CI / check (pull_request) Successful in 37s
2026-07-18 19:00:58 +00:00
chrnx d01be6e393 feat: rename crate to matcha-cli + two-forge CI/CD workflows
CI / check (pull_request) Successful in 40s
Crate renamed matcha->matcha-cli for crates.io (the name matcha is taken); binary stays matcha. Adds description/license/repository and CalVer prerelease version. New .github/workflows: ci (fmt+clippy+test), promote (main+tags -> GitHub), release (relocated from .gitea + crates.io publish on GitHub only). Cargo.lock regenerated; gate passes locally.

Signed-off-by: Diego Resendez <diego.resendez@zero-oneit.com>
2026-07-18 13:58:18 -05:00
5 changed files with 85 additions and 4 deletions

No files matched your search

+23
View File
@@ -0,0 +1,23 @@
name: CI
# Rust gate. Lives in .github/workflows so both Gitea and GitHub run it.
on:
pull_request:
branches: [develop, main]
push:
branches: [develop, main]
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
- name: Add clippy + rustfmt
run: rustup component add clippy rustfmt
- run: cargo fmt --check
- run: cargo clippy --all-targets -- -D warnings
- run: cargo test --locked
+27
View File
@@ -0,0 +1,27 @@
name: Promote → GitHub
# Runs on GITEA ONLY. Mirrors only main + version tags to the public GitHub repo.
on:
push:
branches: [main]
tags: ['v*']
jobs:
push-github:
if: ${{ github.server_url != 'https://github.com' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push main + tags to GitHub
env:
GH_TOKEN: ${{ secrets.GH_PROMOTE_TOKEN }}
run: |
git remote add github "https://x-access-token:${GH_TOKEN}@github.com/Expressive-Tea/matcha.git"
if [ "${{ github.ref_type }}" = "tag" ]; then
git push github "refs/tags/${{ github.ref_name }}"
else
git push github "HEAD:refs/heads/main"
git push github --tags
fi
@@ -1,4 +1,8 @@
name: Release
# On a version tag: build cross-platform binaries and attach them to the release (on
# whichever forge fired — the release API calls are portable). ADDITIONALLY, on GitHub
# only (production), publish the crate to crates.io.
on:
push:
tags: ['v*']
@@ -77,3 +81,25 @@ jobs:
files: |
matcha-${{ matrix.target }}.tar.gz
matcha-${{ matrix.target }}.tar.gz.sha256
# crates.io = production only.
# crates.io = production only, via OIDC Trusted Publishing (no CARGO_TOKEN).
# Requires a trusted publisher configured on crates.io (Expressive-Tea/matcha, release.yml).
publish-crate:
if: ${{ github.server_url == 'https://github.com' }}
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Install Rust
run: |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain stable
echo "$HOME/.cargo/bin" >> "$GITHUB_PATH"
# Exchanges the OIDC id-token for a short-lived crates.io token.
- uses: rust-lang/crates-io-auth-action@v1
id: auth
- name: cargo publish
env:
CARGO_REGISTRY_TOKEN: ${{ steps.auth.outputs.token }}
run: cargo publish --locked
Generated
+2 -2
View File
@@ -253,8 +253,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
[[package]]
name = "matcha"
version = "26.7.0"
name = "matcha-cli"
version = "26.7.0-beta.0"
dependencies = [
"assert_cmd",
"clap",
+7 -2
View File
@@ -1,8 +1,13 @@
[package]
name = "matcha"
version = "26.7.0"
name = "matcha-cli"
version = "26.7.0-beta.0"
edition = "2021"
description = "The CLI for Green Tea — scaffold and manage graph-based apps."
license = "MIT"
repository = "https://github.com/Expressive-Tea/matcha"
# The crate is `matcha-cli` on crates.io (the name `matcha` is taken), but the
# installed binary stays `matcha` — `cargo install matcha-cli` gives you `matcha`.
[[bin]]
name = "matcha"
path = "src/main.rs"