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
81 changes: 81 additions & 0 deletions .github/workflows/auto-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
name: Open pull request

on:
push:
branches:
- "**"

permissions:
contents: read

jobs:
open-pull-request:
if: >-
github.ref_type == 'branch' &&
github.ref_name != github.event.repository.default_branch &&
github.actor != 'dependabot[bot]'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- name: Open a pull request for this branch
uses: actions/github-script@v8
with:
script: |
const { owner, repo } = context.repo;
const branch = context.ref.replace(/^refs\/heads\//, "");
const base = context.payload.repository.default_branch;
const existing = await github.rest.pulls.list({
owner,
repo,
state: "open",
head: `${owner}:${branch}`,
base,
per_page: 1,
});

if (existing.data.length > 0) {
core.info(`Pull request #${existing.data[0].number} already exists for ${branch}.`);
return;
}

const commits = context.payload.commits ?? [];
const subjects = commits
.map(({ message }) => message.split(/\r?\n/, 1)[0].trim())
.filter(Boolean);
const latestSubject = context.payload.head_commit?.message
?.split(/\r?\n/, 1)[0]
?.trim();
const title = (latestSubject || `${branch}: automated pull request`).slice(0, 250);
const changes = subjects.length
? subjects.map((subject) => `- ${subject}`).join("\n")
: `- Changes pushed to \`${branch}\`.`;
const body = [
"## What changed?",
"",
changes,
"",
"## Why?",
"",
`Automatically opened for the \`${branch}\` branch. See the commits above for context.`,
"",
"## Validation",
"",
"CI runs automatically on this pull request.",
"",
"## Release impact",
"",
"Review whether package manifests, release assets, or hosted repositories are affected.",
].join("\n");

const pullRequest = await github.rest.pulls.create({
owner,
repo,
head: branch,
base,
title,
body,
draft: false,
});
core.info(`Opened ${pullRequest.data.html_url}`);
26 changes: 26 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,3 +36,29 @@ jobs:
- uses: actions/checkout@v6
- uses: dtolnay/rust-toolchain@1.85.0
- run: cargo test --locked

website:
name: Website checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: 24
cache: npm
cache-dependency-path: site/package-lock.json
- run: npm ci
working-directory: site
- name: Check generated installer is in sync
run: |
npm run sync-installer
git -C .. diff --exit-code -- site/app/yo-setup/installer.generated.ts
working-directory: site
- run: npm run lint
working-directory: site
- run: ./node_modules/.bin/tsc --noEmit --incremental false
working-directory: site
- run: npm run build
working-directory: site
env:
NEXT_TELEMETRY_DISABLED: 1
3 changes: 3 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ cargo run -- --fast --name YourName
- Run `cargo fmt`, `cargo test`, and `cargo clippy -- -D warnings`.
- Update the README and changelog when users will notice the change.

Pushing a branch other than the default branch automatically opens a pull request.
Push additional commits to update that pull request; Dependabot branches are excluded.

## Community tip packs

Tip packs are YAML files. Keep them practical, short, original, and safe for a broad developer audience.
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@ Choose one method. The full platform notes and verification steps are in [docs/i

| Channel | Install | Status |
| --- | --- | --- |
| Arch / AUR | `yay -S yoo-bin` or `paru -S yoo-bin` | Community package |
| APT (Debian/Ubuntu) | `curl -fsSL https://yo-cli.vercel.app/apt/setup.sh \| sudo sh` then `sudo apt install yoo` | Self-hosted signed repository |
| DNF (Fedora/RHEL) | `sudo dnf config-manager addrepo --from-repofile=https://yo-cli.vercel.app/rpm/yoo.repo` then `sudo dnf install yoo` | Self-hosted signed repository |
| Alpine | Add `https://yo-cli.vercel.app/alpine` to `/etc/apk/repositories`, then `sudo apk add yoo` | Self-hosted APK repository |
| openSUSE Tumbleweed | `sudo zypper ar -f https://yo-cli.vercel.app/opensuse yoo && sudo zypper refresh && sudo zypper install yoo` | Self-hosted signed repository |
| Arch / AUR | `yay -S yoo-bin` | Community package |
| Nix | `nix run github:nihitdev/yo-cli` | GitHub flake |
| Flatpak | `flatpak remote-add --user yoo https://yo-cli.vercel.app/flatpak/yoo.flatpakrepo && flatpak install --user yoo io.github.nihitdev.yoo` | Self-hosted repository |
| Cargo Binstall | `cargo binstall yoo` | Prebuilt GitHub Release binary |
Expand Down
5 changes: 3 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,14 @@ older glibc systems should use Cargo or Nix.

## Arch Linux / AUR

The binary package is prepared for publication as `yoo-bin`:
Install the `yoo-bin` package from the AUR with either helper:

```bash
yay -S yoo-bin
# or
paru -S yoo-bin
```

This requires the maintainer to publish the AUR repository first.
You can build it now from this checkout:

```bash
Expand Down
10 changes: 5 additions & 5 deletions packaging/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ changing completions, run `cargo build --release --locked` followed by
- **Homebrew:** create `nihitdev/homebrew-tap` with an initial default branch.
Optional `HOMEBREW_TAP_TOKEN` needs contents-write access to that repository.
The release job commits only `Formula/yoo.rb`. Without the secret it skips.
- **AUR:** register an account and SSH key, request/create `yoo-bin`, and store
the deploy key as `AUR_SSH_PRIVATE_KEY`. The release job then copies the
generated `PKGBUILD` and `.SRCINFO`, validates the package metadata, and
pushes the AUR checkout. Without the secret, the release bundle remains ready
for manual review and upload.
- **AUR:** the release workflow updates the existing `yoo-bin` package using
`AUR_SSH_PRIVATE_KEY`. When setting up a fork, register an AUR account, add
its SSH key, and save the private deploy key as that secret. Without the
secret, the release bundle still includes the generated package metadata for
manual review and upload.
- **Snap:** Snap Store publishing is currently disabled. Packaging CI still
builds, smoke-tests, and attaches the `.snap` artifact to each GitHub Release.
- **Flatpak:** bundles require no account. A Flathub submission would require
Expand Down
1 change: 1 addition & 0 deletions site/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { SiteExtras } from "./SiteExtras";
import Image from "next/image";

const installs = [
{ label: "Arch / AUR", command: "yay -S yoo-bin\n# or\nparu -S yoo-bin" },
{ label: "Installer", command: "curl --proto '=https' --tlsv1.2 -LsSf https://yo-cli.vercel.app/yo-setup | sh" },
{ label: "APT", command: "curl -fsSL https://yo-cli.vercel.app/apt/setup.sh | sudo sh\nsudo apt install yoo" },
{ label: "DNF", command: "sudo dnf config-manager addrepo --from-repofile=https://yo-cli.vercel.app/rpm/yoo.repo\nsudo dnf install yoo" },
Expand Down
Loading