Compare commits
6
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
ebf03a7180 | ||
|
|
69942ce540 | ||
|
|
a273c249c3 | ||
|
|
846874d33d | ||
|
|
2f74cd8d9b | ||
|
|
d01be6e393 |
No files matched your search
@@ -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
|
||||||
@@ -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
|
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:
|
on:
|
||||||
push:
|
push:
|
||||||
tags: ['v*']
|
tags: ['v*']
|
||||||
@@ -77,3 +81,25 @@ jobs:
|
|||||||
files: |
|
files: |
|
||||||
matcha-${{ matrix.target }}.tar.gz
|
matcha-${{ matrix.target }}.tar.gz
|
||||||
matcha-${{ matrix.target }}.tar.gz.sha256
|
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
@@ -253,8 +253,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
checksum = "32a66949e030da00e8c7d4434b251670a91556f4144941d37452769c25d58a53"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "matcha"
|
name = "matcha-cli"
|
||||||
version = "26.7.0"
|
version = "26.7.0-beta.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"assert_cmd",
|
"assert_cmd",
|
||||||
"clap",
|
"clap",
|
||||||
|
|||||||
+7
-2
@@ -1,8 +1,13 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "matcha"
|
name = "matcha-cli"
|
||||||
version = "26.7.0"
|
version = "26.7.0-beta.0"
|
||||||
edition = "2021"
|
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]]
|
[[bin]]
|
||||||
name = "matcha"
|
name = "matcha"
|
||||||
path = "src/main.rs"
|
path = "src/main.rs"
|
||||||
|
|||||||
Reference in new issue
Block a user