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
8 changes: 8 additions & 0 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
blank_issues_enabled: false
contact_links:
- name: Question or idea
url: https://github.com/iletai/BaseNavigationStack/discussions
about: Ask questions and discuss ideas in GitHub Discussions.
- name: Security vulnerability
url: https://github.com/iletai/BaseNavigationStack/security/advisories/new
about: Report security issues privately.
10 changes: 0 additions & 10 deletions .github/ISSUE_TEMPLATE/custom.md

This file was deleted.

8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [main, develop]
branches: [main, develop, 'release/**', 'hotfix/**']
pull_request:
branches: [main, develop]
branches: [main, develop, 'release/**', 'hotfix/**']

concurrency:
group: ci-${{ github.ref }}
Expand Down Expand Up @@ -79,7 +79,7 @@ jobs:
platform: [tvOS, watchOS, visionOS]
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
Expand All @@ -98,7 +98,7 @@ jobs:
runs-on: macos-26
steps:
- name: Checkout Repository
uses: actions/checkout@v4
uses: actions/checkout@v7

- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
Expand Down
28 changes: 27 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,31 @@ jobs:
steps:
- name: Checkout Repository
uses: actions/checkout@v7
with:
fetch-depth: 0

- name: Verify Tag Is On main
run: |
git fetch origin main
if ! git merge-base --is-ancestor "$GITHUB_SHA" origin/main; then
echo "::error::Tag ${GITHUB_REF_NAME} is not on main. Release from main only (see CONTRIBUTING.md)."
exit 1
fi

- name: Extract Release Notes From CHANGELOG
run: |
VERSION="${GITHUB_REF_NAME#v}"
awk -v ver="$VERSION" '
index($0, "## [" ver "]") == 1 { found = 1; next }
found && /^## \[/ { exit }
found && /^\[[^]]+\]: / { exit }
found { print }
' CHANGELOG.md > "$RUNNER_TEMP/notes.md"
if [ ! -s "$RUNNER_TEMP/notes.md" ]; then
echo "::error::No '## [$VERSION]' section in CHANGELOG.md"
exit 1
fi
cat "$RUNNER_TEMP/notes.md"

- name: Select Xcode
uses: maxim-lobanov/setup-xcode@v1
Expand All @@ -31,6 +56,7 @@ jobs:
- name: Create Release
uses: softprops/action-gh-release@v3
with:
generate_release_notes: true
body_path: ${{ runner.temp }}/notes.md
prerelease: ${{ contains(github.ref_name, '-') }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
4 changes: 4 additions & 0 deletions .spi.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
version: 1
builder:
configs:
- documentation_targets: [BaseNavigationStack]
5 changes: 4 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

All notable changes to this project are documented here. Format follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/); versions follow [SemVer](https://semver.org).

## [2.0.0] - Unreleased
## [Unreleased]

### Added
- `NavigationRouter<Route, Sheet, Cover>`: one `@MainActor @Observable` router for stack, sheet, and cover.
Expand All @@ -29,3 +29,6 @@ All notable changes to this project are documented here. Format follows [Keep a
## [1.0.3] - 2023-12-24

Last 1.x release (`BaseNavigationStack<ScreenView>` + `BaseViewProtocol`).

[Unreleased]: https://github.com/iletai/BaseNavigationStack/compare/1.0.3...develop
[1.0.3]: https://github.com/iletai/BaseNavigationStack/releases/tag/1.0.3
85 changes: 85 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,85 @@

# Contributor Covenant Code of Conduct

## Our Pledge

We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.

We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.

## Our Standards

Examples of behavior that contributes to a positive environment for our community include:

* Demonstrating empathy and kindness toward other people
* Being respectful of differing opinions, viewpoints, and experiences
* Giving and gracefully accepting constructive feedback
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
* Focusing on what is best not just for us as individuals, but for the overall community

Examples of unacceptable behavior include:

* The use of sexualized language or imagery, and sexual attention or advances of any kind
* Trolling, insulting or derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or email address, without their explicit permission
* Other conduct which could reasonably be considered inappropriate in a professional setting

## Enforcement Responsibilities

Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.

Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.

## Scope

This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement by contacting the maintainer [@iletai](https://github.com/iletai) through a [private GitHub security advisory](https://github.com/iletai/BaseNavigationStack/security/advisories/new) or direct message. All complaints will be reviewed and investigated promptly and fairly.

All community leaders are obligated to respect the privacy and security of the reporter of any incident.

## Enforcement Guidelines

Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:

### 1. Correction

**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.

**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.

### 2. Warning

**Community Impact**: A violation through a single incident or series of actions.

**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.

### 3. Temporary Ban

**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.

**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.

### 4. Permanent Ban

**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.

**Consequence**: A permanent ban from any sort of public interaction within the community.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.1, available at [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].

Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder][Mozilla CoC].

For answers to common questions about this code of conduct, see the FAQ at [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at [https://www.contributor-covenant.org/translations][translations].

[homepage]: https://www.contributor-covenant.org
[v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
[Mozilla CoC]: https://github.com/mozilla/diversity
[FAQ]: https://www.contributor-covenant.org/faq
[translations]: https://www.contributor-covenant.org/translations

47 changes: 47 additions & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# Contributing

Thanks for helping improve BaseNavigationStack. Please read the [Code of Conduct](CODE_OF_CONDUCT.md) first.

## Branches

The project uses Git Flow:

| Branch | Purpose |
| --- | --- |
| `develop` | Integration branch and default branch. All pull requests target `develop`. |
| `release/x.y.z` | Short-lived branch that freezes a version: CHANGELOG date and docs only, no new features. |
| `main` | Stable branch. Only receives merges from `release/*` (or `hotfix/*`). Every commit on `main` is a released version. |
| `feature/*`, `fix/*`, `docs/*`, `chore/*` | Work branches, created from `develop`. |
| `hotfix/x.y.z` | Urgent fix created from `main`, merged into `main` and back into `develop`. |

## Pull requests

1. Branch from `develop`.
2. Use [Conventional Commits](https://www.conventionalcommits.org) (`feat:`, `fix:`, `docs:`, `chore:`, `ci:`, `refactor:`, `test:`).
3. Add or update tests, and add an entry under `## [Unreleased]` in [CHANGELOG.md](CHANGELOG.md) for user-visible changes.
4. Before pushing:
```bash
swift test
swiftlint --strict
```
5. CI must pass (macOS, iOS Simulator, tvOS, watchOS, visionOS, example app, SwiftLint).

## Versioning

[Semantic Versioning](https://semver.org). Tags have no `v` prefix (`2.0.0`, `2.0.1`). Removing or changing public API requires a major version.

## Release process (maintainers)

1. From an up-to-date `develop`, create `release/x.y.z`.
2. In `CHANGELOG.md`, rename `## [Unreleased]` to `## [x.y.z] - YYYY-MM-DD` and add a fresh empty `## [Unreleased]` above it.
3. Open a pull request `release/x.y.z` → `main`. After CI passes, merge with a **merge commit**.
4. Tag the merge commit on `main` and push the tag:
```bash
git checkout main && git pull
git tag -a x.y.z -m "x.y.z"
git push origin x.y.z
```
The `Release` workflow checks that the tag is on `main` and listed in `CHANGELOG.md`, runs the tests, and publishes a GitHub Release with that CHANGELOG section as notes.
5. Merge `main` back into `develop` (pull request `main` → `develop`) so the CHANGELOG date reaches `develop`.

Never move or delete a published tag: Swift Package Manager caches resolved versions.
15 changes: 5 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -358,23 +358,18 @@ xcodebuild test -scheme BaseNavigationStack -destination "id=$SIM_ID" CODE_SIGNI

## Docs & Wiki

- **Design Specs:** [`docs/superpowers/specs/`](docs/superpowers/specs/) — Container, async ergonomics, performance goals.
- **Implementation Plans:** [`docs/superpowers/plans/`](docs/superpowers/plans/) — Step-by-step rollout notes.
- **GitHub Wiki:** [BaseNavigationStack Wiki](https://github.com/iletai/BaseNavigationStack/wiki) — Extended guides, migration notes, and FAQs (if enabled).
- **Issues:** [Report bugs / request features](https://github.com/iletai/BaseNavigationStack/issues)
- **Discussions:** [Community Q&A](https://github.com/iletai/BaseNavigationStack/discussions)

## Contributing

Contributions are welcome!
Contributions are welcome. Pull requests target `develop`; releases are cut from `release/x.y.z` branches into `main` and tagged there.

1. **Fork** the repo and create a feature branch off `develop`.
2. **Follow style** — Match existing Swift style; CI runs `swiftlint --strict`.
3. **Test** — Add/update tests for behavior changes. Run `swift test` locally.
4. **Commit** — Use clear, conventional commits (`feat:`, `fix:`, `refactor:`, `test:`, `docs:`).
5. **Open a PR** — Target `develop` with a concise description and test notes.

See [`.github/PULL_REQUEST_TEMPLATE.md`](.github/PULL_REQUEST_TEMPLATE.md) and [`.github/ISSUE_TEMPLATE/`](.github/ISSUE_TEMPLATE/) for details.
- [CONTRIBUTING.md](CONTRIBUTING.md) — branch model, commit style, local checks, release process.
- [CHANGELOG.md](CHANGELOG.md) — version history.
- [SECURITY.md](SECURITY.md) — report vulnerabilities privately.
- [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md)

## License

Expand Down
14 changes: 14 additions & 0 deletions SECURITY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# Security Policy

## Supported Versions

| Version | Supported |
| ------- | --------- |
| 2.x | Yes |
| 1.x | No |

## Reporting a Vulnerability

Please do **not** open a public issue for security problems.

Report privately through [GitHub Security Advisories](https://github.com/iletai/BaseNavigationStack/security/advisories/new). You should get a first response within 7 days. Once a fix is released, the advisory is published with credit to the reporter unless you prefer otherwise.
Loading
Loading