rylease 0.0.0-stage → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +112 -2
- package/dist/cli.mjs +2 -0
- package/dist/index-CokIoEcv.d.cts +1667 -0
- package/dist/index-CokIoEcv.d.cts.map +1 -0
- package/dist/index-qxjyrLIy.d.mts +1666 -0
- package/dist/index-qxjyrLIy.d.mts.map +1 -0
- package/dist/index.cjs +66 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +1 -0
- package/dist/internal.cjs +239 -0
- package/dist/internal.cjs.map +1 -0
- package/dist/internal.d.cts +50 -0
- package/dist/internal.d.cts.map +1 -0
- package/dist/internal.d.mts +50 -0
- package/dist/internal.d.mts.map +1 -0
- package/dist/internal.mjs +232 -0
- package/dist/internal.mjs.map +1 -0
- package/dist/rolldown-runtime-8H4AJuhK.mjs +14 -0
- package/dist/src-BkALSGzm.mjs +5713 -0
- package/dist/src-BkALSGzm.mjs.map +1 -0
- package/dist/src-DjAVyMrO.cjs +5959 -0
- package/dist/src-DjAVyMrO.cjs.map +1 -0
- package/package.json +81 -3
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ryan Garber
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -1,3 +1,113 @@
|
|
|
1
|
-
#
|
|
1
|
+
# rylease
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
A release pipeline that doesn't fight you.
|
|
4
|
+
|
|
5
|
+
Everything is a **step**: a small, named, strictly typed function that does one auditable thing and says why. Steps run in a fixed order of phases. Each one receives the environment, your own context, and the outputs of every step before it.
|
|
6
|
+
|
|
7
|
+
Nothing assumes semver, npm or GitHub, and each of them is one line to add. Every step declares its options once, and they work the same in a config file as in TypeScript. Steps also declare what they **need** and **provide**, e.g. `labels/determine-kind` needs changes with labels. A release that can't work fails before anything runs, and the error says which step would fix it.
|
|
8
|
+
|
|
9
|
+
## Quick start
|
|
10
|
+
|
|
11
|
+
```yaml
|
|
12
|
+
permissions:
|
|
13
|
+
contents: write
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v7
|
|
16
|
+
with:
|
|
17
|
+
fetch-depth: 0 # full history is needed to find the previous release
|
|
18
|
+
- uses: ryangarber/rylease@v3
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
That runs the bundled [`conventional`](#presets) preset: conventional commits since the last tag become a semver version, a git tag and a GitHub release.
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
rylease release · main · /home/runner/work/project/project
|
|
25
|
+
|
|
26
|
+
✔ read-version git/tags 4ms v1.0.0 at 0d92bfa, nearest on HEAD
|
|
27
|
+
✔ read-changes conventional/read-commits 12ms 3 changes in 2 commits since 0d92bfa
|
|
28
|
+
✔ determine-kind conventional/determine-kind <1ms 'feat' in title (commit 3a7a7e3)
|
|
29
|
+
✔ determine-version semver <1ms 1.1.0: 'feature' from 1.0.0, bumps minor
|
|
30
|
+
✔ determine-notes conventional/determine-notes <1ms feature release; features: 1, bug fixes: 1, other: 1
|
|
31
|
+
✔ release git/create-tag 92ms tagged v1.1.0 at 3a7a7e3 and pushed to origin
|
|
32
|
+
✔ release github/create-release 410ms created release v1.1.0: https://github.com/me/project/releases/tag/v1.1.0
|
|
33
|
+
|
|
34
|
+
1.0.0 → 1.1.0 (feature) · released
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Outside GitHub Actions, `npx rylease` does the same; see [CLI, GitLab and other CI](docs/cli.md).
|
|
38
|
+
|
|
39
|
+
## Phases
|
|
40
|
+
|
|
41
|
+
```
|
|
42
|
+
read-version → read-changes → determine-kind → determine-version → determine-notes → write → stage → release
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
| Phase | | Filled by |
|
|
46
|
+
|---|---|---|
|
|
47
|
+
| `read-version` | Finds the previous release: its version, commit and tag. | The release's **history**, e.g. `git/tags`. |
|
|
48
|
+
| `read-changes` | Collects what changed since then. | Steps, e.g. `conventional/read-commits`. |
|
|
49
|
+
| `determine-kind` | Decides how much changed: `breaking`, `feature`, `fix`, or `none` for nothing to release. | Steps, e.g. `conventional/determine-kind`. |
|
|
50
|
+
| `determine-version` | Bumps the previous version by the kind, on a **channel** if there is one, e.g. `2.0.0-next.1`. | The release's **scheme**, e.g. `semver`. |
|
|
51
|
+
| `determine-notes` | Writes the release notes. | Steps, e.g. `conventional/determine-notes`. |
|
|
52
|
+
| `write` | Changes files, e.g. the version in `package.json` or a changelog. | Steps, e.g. `fs/write-version`. |
|
|
53
|
+
| `stage` | Commits what `write` changed, or proposes it in a pull request. | Steps, e.g. `git/commit`. |
|
|
54
|
+
| `release` | Ships the result: tags, releases, packages. | Steps, e.g. `git/create-tag`, `npm/publish`. |
|
|
55
|
+
|
|
56
|
+
rylease handles `read-version` and `determine-version` itself, with the history and scheme. Both come from the preset, unless the release sets its own; there are no other defaults. No step parses or bumps a version; every step takes it as plain text.
|
|
57
|
+
|
|
58
|
+
Steps run by phase, so the order you list them in doesn't matter; steps of the same phase run in the order given, each receiving what the one before it produced.
|
|
59
|
+
|
|
60
|
+
## Configuring
|
|
61
|
+
|
|
62
|
+
`steps` is a list shaped like a workflow's: each entry `uses` a step or preset, gives it options `with`, and may run only `if` an expression holds. A preset takes options for each of its steps by name, and `false` leaves one out.
|
|
63
|
+
|
|
64
|
+
```yaml
|
|
65
|
+
- uses: ryangarber/rylease@v3
|
|
66
|
+
with:
|
|
67
|
+
steps: |
|
|
68
|
+
- uses: conventional
|
|
69
|
+
with:
|
|
70
|
+
github/create-release: { draft: true }
|
|
71
|
+
conventional/determine-kind:
|
|
72
|
+
types: { docs: none, chore: none, "chore(deps)": fix }
|
|
73
|
+
- uses: fs/write-version
|
|
74
|
+
with: { format: npm }
|
|
75
|
+
- uses: git/commit
|
|
76
|
+
- uses: npm/publish
|
|
77
|
+
if: "!dryRun && !prerelease"
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
The same keys can live in `rylease.yml`, `.github/rylease.yml` or `rylease.config.ts`. Options are checked before anything runs, and a typo fails with its exact location. The action's inputs and outputs, config files and conditions are in [Configuration](docs/configuration.md).
|
|
81
|
+
|
|
82
|
+
## Presets
|
|
83
|
+
|
|
84
|
+
A preset is a list of steps used as one, with the scheme and history it needs. Every preset pushes the release's tag, along with the branch, to `origin` in one atomic push.
|
|
85
|
+
|
|
86
|
+
| Preset | Steps | `scheme` | `history` |
|
|
87
|
+
|---|---|---|---|
|
|
88
|
+
| `conventional` | `conventional/read-commits`, `conventional/determine-kind`, `conventional/determine-notes`, `git/create-tag`, `github/create-release` | `semver` | `git/tags` |
|
|
89
|
+
| `conventional-pr` | `conventional`'s, with `fs/write-changes` and `github/open-release-pr` | `semver` | `github/release-pr` |
|
|
90
|
+
| `keep-a-changelog` | `keep-a-changelog/read-unreleased`, `labels/determine-kind`, `labels/determine-notes`, `keep-a-changelog/write-release`, `git/commit`, `git/create-tag`, `github/create-release` | set one | `git/tags` |
|
|
91
|
+
| `change-files` | `change-files/read`, `labels/determine-kind`, `labels/determine-notes`, `change-files/clean`, `fs/write-changes`, `git/commit`, `git/create-tag`, `github/create-release` | set one | `git/tags` |
|
|
92
|
+
|
|
93
|
+
- **`conventional`** reads every [conventional commit](https://www.conventionalcommits.org) since the previous tag. `!` or `BREAKING` is breaking, `feat` a feature, and anything else a fix. The notes have `Breaking Changes`, `Features`, `Bug Fixes`, `Performance Improvements`, `Reverts` and `Other` sections. It tags HEAD and creates a GitHub release, and writes no files: it works from git tags alone, in any project.
|
|
94
|
+
- **`conventional-pr`** does the same, but instead of releasing on every push it writes `CHANGELOG.md` and proposes the release in a pull request, kept up to date as changes land; merging it tags and releases. See [Release pull requests](docs/release-pull-requests.md).
|
|
95
|
+
- **`keep-a-changelog`** releases the `## [Unreleased]` section of a hand-written [Keep a Changelog](https://keepachangelog.com). `Removed` entries are breaking, `Added`, `Changed` and `Deprecated` ones features, and the rest fixes. It moves the section under the new version, commits it, then tags and releases.
|
|
96
|
+
- **`change-files`** releases what the files in `.changes/` say, each naming the components it changes and how much. It notes each change under its kind, deletes the files in the release commit, writes `CHANGELOG.md`, then tags and releases. See [Other sources](docs/sources.md#change-files).
|
|
97
|
+
|
|
98
|
+
Sections don't imply a version scheme, so with `keep-a-changelog` and `change-files`, set `scheme`, e.g. `scheme: semver`. To keep the version in a project's own files or publish a package, add the steps for it alongside the preset; see [Ecosystems](docs/ecosystems.md).
|
|
99
|
+
|
|
100
|
+
## Docs
|
|
101
|
+
|
|
102
|
+
- [Configuration](docs/configuration.md): action inputs and outputs, config files, conditions.
|
|
103
|
+
- [Ecosystems](docs/ecosystems.md): version files and publishing for npm, Dart and Flutter, Cargo, Python, Ruby, .NET and more.
|
|
104
|
+
- [Other sources](docs/sources.md): pull requests, labels, Keep a Changelog, change files, GitLab.
|
|
105
|
+
- [Schemes](docs/schemes.md): semver, calendar versions, your own.
|
|
106
|
+
- [Channels](docs/channels.md): prereleases and builds.
|
|
107
|
+
- [Monorepos](docs/monorepos.md): components, released together or apart.
|
|
108
|
+
- [Release pull requests](docs/release-pull-requests.md)
|
|
109
|
+
- [Uploading builds](docs/uploading-builds.md): to the release, from later jobs.
|
|
110
|
+
- [CLI, GitLab and other CI](docs/cli.md), and testing workflows locally.
|
|
111
|
+
- [TypeScript](docs/typescript.md): releases as scripts, custom steps.
|
|
112
|
+
- [Migrating from v2](docs/migrating-from-v2.md)
|
|
113
|
+
- [Reference](docs/reference/README.md): every bundled step, scheme and source, with its options.
|
package/dist/cli.mjs
ADDED
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import{createRequire as e}from"node:module";import{spawn as t}from"node:child_process";import{realpathSync as n}from"node:fs";import{join as r}from"node:path";import{fileURLToPath as i,pathToFileURL as a}from"node:url";const o=i(new URL(`..`,import.meta.url));async function s(e,{cwd:t=process.cwd(),installed:n=c,fallback:r=l}={}){let i=await n(t);return i?i.run(e,{engine:o}):r(e)}async function c(t){let n;try{n=e(r(t,`package.json`)).resolve(`@rylease/cli`)}catch{return}return await import(a(n).href)}function l(e){return new Promise((n,r)=>{let i=t(`npx`,[`--yes`,`@rylease/cli@^0.1.1`,...e],{stdio:`inherit`,env:{...process.env,RYLEASE_ENGINE:o},shell:process.platform===`win32`});i.on(`error`,r),i.on(`exit`,(e,t)=>n(t?1:e??1))})}process.argv[1]&&u(process.argv[1])&&s(process.argv.slice(2)).then(e=>{process.exitCode=e},e=>{process.stderr.write(`rylease: ${e instanceof Error?e.message:String(e)}\n`),process.exitCode=1});function u(e){try{return import.meta.url===a(n(e)).href}catch{return!1}}export{s as shim};
|