Skip to content

Commit

Permalink
docs(website): add more useful information
Browse files Browse the repository at this point in the history
  • Loading branch information
dalisoft committed Jun 17, 2024
1 parent feac02d commit 46d9e5b
Show file tree
Hide file tree
Showing 4 changed files with 275 additions and 0 deletions.
138 changes: 138 additions & 0 deletions docs/USAGE.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ bash .release-me/release.sh --plugins=git,github-release --preset=conventional-c

## Options

### Quick summary

| Name | Description | Default | Required |
| ------------- | -------------------------------------------------------------------------- | ---------------------- | -------- |
| `dry-run` | Show only actions on logs | `false` | No |
Expand All @@ -41,3 +43,139 @@ bash .release-me/release.sh --plugins=git,github-release --preset=conventional-c
| `pre-release` | Publish this project as non-production ready | `false` | No |
| `preset` | Presets compatibility, see [Presets](./PRESETS.md) | `conventional-commits` | No |
| `plugins` | Plugins compatibility, see [Plugins](./PLUGINS.md) | `git` | No |

### `dry-run`

- Shorthand: `-d`
- Default: `-`
- Type: `boolean`
- Requires: `No`
- Values: only key
- Example: `release-me --dry-run` or `release-me -d`
- Used by: **all** plugins and preset

When option is set, all plugins (made by author plugins only) works as a see what happens before acting. Does not take actions, just shows what actions could be done when removing this flag. You can combine this method with [`verbose`](#verbose) or [`quiet`](#quiet) mode to get desired results

### `verbose`

:::warning

On CI it's always set under the hood for debugging purposes

:::

- Default: `-`
- Type: `boolean`
- Requires: `No`
- Values: only key
- Example: `release-me --verbose`
- Used by: **all** plugins and preset

When option is set, you get more logs and information about the process and what actions are currently processing or will be on [`dry-run`](#dry-run) mode

### `quiet`

- Shorthand: `-q`
- Default: `-`
- Type: `boolean`
- Requires: `No`
- Values: only key
- Example: `release-me --quiet` or `release-me -q`
- Used by: **all** plugins and preset

When option is set, you get less logs and information about the process and what actions are currently processing or will be on [`dry-run`](#dry-run) mode

### `workspace`

:::tip

This option works best with [pnpm](https://pnpm.io) package manager

:::

- Shorthand: `-w`
- Default: `-`
- Type: `boolean`
- Requires: `Yes` on workspace projects
- Values: only key
- Example: `release-me --workspace` or `release-me -w`
- Used by: **workspace** preset

This mode allows you release entire workspace projects without hassle or headache with same speed and easy-of-use you love.

### `use-version`

:::warning

This method will work when using with [`workspace`](#workspace) option used to avoid confusion as in monorepo/workspaces can be either many git tags or no tags

:::

- Default: `-`
- Type: `boolean`
- Requires: `No`
- Values: only key
- Example: `release-me --use-version`
- Used by: **workspace** preset

This option makes your last version fetch from manifest (like `package.json`) instead of **Git tags**.

Useful for such cases whereas many git tags or no tags

### `stable`

:::tip

This is useful for early stage projects, Cargo projects, Bash libraries or projects

:::

- Default: `-`
- Type: `boolean`
- Requires: `No`
- Values: only key
- Example: `release-me --stable`
- Used by: **github-release** plugins

This option helps you switch from alpha release to stable release easier than ever or allows you use stable version at start.

:::info

This option runs this project same behavior as [semantic-release](https://semantic-release.gitbook.io/semantic-release) works, so you can use option as drop-in replacement for [semantic-release](https://semantic-release.gitbook.io/semantic-release)

:::

### `pre-release`

:::tip

This is useful for early stage projects, Cargo projects, Bash libraries or projects like [`stable`](#stable) option but does opposite action

:::

- Default: `-`
- Type: `boolean`
- Requires: `No`
- Values: only key
- Example: `release-me --pre-release`
- Used by: **github-release** plugins

This option helps you keep your project as alpha release easier than ever or allows you use pre-release versions.

### `preset`

- Default: `conventional-commits`
- Type: `string`
- Requires: `Yes`
- Values: one of [Presets](/docs/PRESETS.md)
- Example: `release-me --preset=workspace`
- Used by: **Core** features

### `plugins`

- Default: `git`
- Type: `string`
- Requires: `Yes`
- Values: String of Array of [Plugins](/docs/PLUGINS.md)
- Example: `release-me --plugins=npm-post,npm,git,github-release`
- Used by: **Core** features
87 changes: 87 additions & 0 deletions docs/features/GPG_SIGN.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,90 @@ sidebar_position: 1
---

# GPG Sign

This project allows you use GPG Sign for your Git tags without headaches and with keeping same performance

There a guide how to add GPG Sign for your Git tags on your release workflow

## Step-by-step guide

:::warning

First follow these guides and then come here

- [Checking for existing GPG keys](https://docs.github.com/en/authentication/managing-commit-signature-verification/checking-for-existing-gpg-keys)
- [Generating a new GPG key](https://docs.github.com/en/authentication/managing-commit-signature-verification/generating-a-new-gpg-key)
- [Add a GPG key to your GitHub account](https://docs.github.com/en/authentication/managing-commit-signature-verification/adding-a-gpg-key-to-your-github-account)

:::

### Get your GPG key ID

This guide ensures you already followed guides above

```bash title="Bash Terminal"
gpg --list-secret-keys
```

```bash title="Result"
[keyboxd]
---------
sec ed25519 YYYY-MM-DD [SC] [expires: YYYY-MM-DD]
2B47FD15064C6CCCC90CA251E833E64EF42E8DEA
uid [ultimate] FirstName LastName <mail@domain.com>
ssb cv25519 YYYY-MM-DD [E] [expires: YYYY-MM-DD]

sec ed25519 YYYY-MM-DD [SC]
ABA8161A192052B2C8C2D68A82406676A919222E
uid [ unknown] FirstName LastName (Software Engineer) <mail@domain.com>
```

then you can copy any of `Key ID` but i'll choose `ABA8161A192052B2C8C2D68A82406676A919222E` so later all of steps follows this `Key ID`

### Export your GPG key

```bash title="Bash Terminal"
gpg --export-secret-keys ABA8161A192052B2C8C2D68A82406676A919222E | base64
```

then copy or your result from your **Terminal** app or export to file with command below

```bash title="Bash Terminal"
gpg --export-secret-keys ABA8161A192052B2C8C2D68A82406676A919222E | base64 > gpg-base64
```

then copy content of `gpg-base64` file

### Save your GPG key

:::tip

See [`GPG Environment variables`](../CONFIGURATION.md#gpg-git-variables)

:::

Save your GPG key as `GPG_KEY` variable as **SECRET** not **VARIABLE**

### Save your GPG key ID

:::tip

See [`GPG Environment variables`](../CONFIGURATION.md#gpg-git-variables)

:::

Save your GPG key ID (example `ABA8161A192052B2C8C2D68A82406676A919222E`) as `GPG_KEY_ID` variable as **SECRET** or **VARIABLE** depending on how much your GPG Key ID are should be secure

### Set your GPG Passphrase

:::tip

If your GPG key is encrypted by passphrase, you should set passphrase too

:::

Save your GPG passphrase as `GPG_PASSPHRASE` variable as **SECRET** not **VARIABLE**

### That's all

Trigger release and see **signed Git tags** for your release
4 changes: 4 additions & 0 deletions docs/features/RUST.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ sidebar_position: 2
---

# Rust projects

Cargo projects always has a different versioning than semantic versioning, so this project makes your release workflow by using `0.x`/`pre-release` release workflow

You should combine [`pre-release`](../USAGE.md#pre-release) and [`workspace`](../USAGE.md#workspace) if you using `workspace` feature or use [`pre-release`](../USAGE.md#pre-release) option for use Rust/Cargo versioning
46 changes: 46 additions & 0 deletions docs/features/WORKSPACE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,49 @@ sidebar_position: 3
---

# Workspace

:::tip

First check out [`workspace`](../USAGE.md#workspace) option for how it works

:::

This project allows you publish workspace packages easier but automatized **Git tagging**, **npm publish**, **GitHub release** and/or **Generate changelog** for each package without headaches

You can check [`workspace`](../USAGE.md#workspace) example from [here](https://github.com/dalisoft/airlight/releases)

## Step-by-step guide

:::info

You should follow and read these pages before read this page

- [Installation](../INSTALLATION.md)
- [Usage](../USAGE.md)
- [pnpm Workspace](https://pnpm.io/pnpm-workspace_yaml)

:::

### Add `release` script

```json title="package.json"
{
"release": "pnpm -r --workspace-concurrency=1 exec ../../.release-me/release.sh -w --use-version --plugins=npm,npm-post,git,github-release --preset=workspace"
}
```

Modyify plugins as you wish and for your project needs

### Add or set `env`

Add required [`Environment variables`](../CONFIGURATION.md#environment-variables) to file `.env` or set into your environment

Another option could be set your [`Environment variables`](../CONFIGURATION.md#environment-variables) on **CI** and run on **CI** for testing purposes. See [`example`](../CONFIGURATION.md#gh-actions-configurations)

### Run `release` script

```bash title="Bash (Terminal)"
pnpm run release
# or
env $(cat .env) pnpm run release
```

0 comments on commit 46d9e5b

Please sign in to comment.