Skip to content

Commit

Permalink
docs: document the new options
Browse files Browse the repository at this point in the history
  • Loading branch information
Ahmad Nassri committed Sep 4, 2022
1 parent 15d294d commit 47b624c
Show file tree
Hide file tree
Showing 3 changed files with 73 additions and 279 deletions.
181 changes: 40 additions & 141 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ semantic-release as a GitHub Action, with all presets included

[![license][license-img]][license-url]
[![release][release-img]][release-url]
[![super linter][super-linter-img]][super-linter-url]
[![test][test-img]][test-url]
[![semantic][semantic-img]][semantic-url]

[`semantic-release`](https://semantic-release.gitbook.io/) as a GitHub Action, with **all** presets included.
[`semantic-release`][] as a GitHub Action, with **all** presets included.

- works with environment variables as documented in [`semantic-release` docs](https://semantic-release.gitbook.io/semantic-release/usage/ci-configuration#authentication)
- customizable through [`semantic-release` configuration file](https://semantic-release.gitbook.io/semantic-release/usage/configuration#configuration-file)
- works with environment variables as documented in [`semantic-release` docs][]
- customizable through [`semantic-release` configuration file][]

## Usage

Expand All @@ -29,147 +27,54 @@ jobs:
uses: actions/checkout@v2

- name: semantic-release
uses: ahmadnassri/action-semantic-release@v1
uses: ahmadnassri/action-semantic-release@v2
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
### Inputs
#### `config` *(optional)*
| input | required | default | description |
|------------|----------|--------------|------------------------------------------------------------------|
| `config` | ❌ | [see docs][] | File path to configuration file |
| `dry` | ❌ | `false` | Execute in "dry-run" mode |
| `debug` | ❌ | `false` | Output debugging information |
| `format` | ❌ | [see docs][] | The Git tag format used by semantic-release to identify releases |
| `branches` | ❌ | [see docs][] | The branches on which releases should happen |

File path to configuration file

> ***Note**: only use this if you're using a non-standard [configuration file name](https://semantic-release.gitbook.io/semantic-release/usage/configuration#configuration-file)*
> ⚠️ ***Note**: only use `config` if you're using a non-standard [configuration file name][`semantic-release` configuration file] and in **JSON format***

### Outputs

#### `published`

> default: `true`

`'true'` when release is successfully published, `'false'` when nothing is published

#### `last-release-git-head`

> default: `da39a3ee5e6b4b0d3255bfef95601890afd80709`

The sha of the last commit being part of the last release

#### `last-release-git-tag`

> default: `v1.0.0`

The Git tag associated with the last release

#### `last-release-channel`

> default: `next`

The distribution channel on which the last release was initially made available (`undefined` for the default distribution channel)

#### `last-release-version`

> default: `1.0.0`

The version of the last release

#### `last-release-version-major`

> default: `1`

last release version major component

#### `last-release-version-minor`

> default: `0`

last release version minor component

#### `last-release-version-patch`

> default: `0`

last release version patch component

#### `last-release-version-prerelease`

> default: `-`

last release version prerelease component

#### `last-release-version-buildmetadata`

> default: `-`

last release version buildmetadata component

#### `release-type`

> default: `N/A`

The semver type of the release (patch, minor or major)

#### `release-git-head`

> default: `68eb2c4d778050b0701136ca129f837d7ed494d2`

The sha of the last commit being part of the new release

#### `release-git-tag`

> default: `v1.1.0`

The Git tag associated with the new release

#### `release-version`

> default: `1.1.0`

The version of the new release.

#### `release-notes`

> default: `...`

The release notes for the new release

#### `release-channel`

> default: `next`

The distribution channel on which the next release will be made available (`undefined` for the default distribution channel)

#### `release-version-major`

> default: `1`

last release version major component

#### `release-version-minor`

> default: `1`

last release version minor component

#### `release-version-patch`

> default: `0`

last release version patch component

#### `release-version-prerelease`

> default: `N/A`

last release version prerelease component

#### `release-version-buildmetadata`

> default: `N/A`

last release version buildmetadata component
| output | example | description |
|--------------------------------------|----------|---------------------------------------------------------------------------------------------------------------------------------|
| `published` | `true` | `'true'` when release is successfully published, `'false'` when nothing is published |
| `last-release-git-head` | `d80709` | The sha of the last commit being part of the last release |
| `last-release-git-tag` | `v1.0.0` | The Git tag associated with the last release |
| `last-release-channel` | `next` | The distribution channel on which the last release was initially made available *(`null` for the default distribution channel)* |
| `last-release-version` | `1.0.0` | The version of the last release |
| `last-release-version-major` | `1` | last release version major component |
| `last-release-version-minor` | `0` | last release version minor component |
| `last-release-version-patch` | `0` | last release version patch component |
| `last-release-version-prerelease` | `-` | last release version prerelease component |
| `last-release-version-buildmetadata` | `-` | last release version buildmetadata component |
| `release-type` | `major` | The semver type of the release (patch, minor or major) |
| `release-git-head` | `d494d2` | The sha of the last commit being part of the new release |
| `release-git-tag` | `v1.1.0` | The Git tag associated with the new release |
| `release-version` | `1.1.0` | The version of the new release. |
| `release-notes` | `...` | The release notes for the new release |
| `release-channel` | `next` | The distribution channel on which the next release will be made available *(`null` for the default distribution channel)* |
| `release-version-major` | `1` | last release version major component |
| `release-version-minor` | `1` | last release version minor component |
| `release-version-patch` | `0` | last release version patch component |
| `release-version-prerelease` | `-` | last release version prerelease component |
| `release-version-buildmetadata` | `-` | last release version buildmetadata component |

[`semantic-release`]: https://semantic-release.gitbook.io/
[`semantic-release` docs]: https://semantic-release.gitbook.io/semantic-release/usage/ci-configuration#authentication
[`semantic-release` configuration file]: https://semantic-release.gitbook.io/semantic-release/usage/configuration#configuration-file
[see docs]: https://semantic-release.gitbook.io/semantic-release/usage/configuration#options

----
> Author: [Ahmad Nassri](https://www.ahmadnassri.com/) •
Expand All @@ -181,11 +86,5 @@ last release version buildmetadata component
[release-url]: https://github.com/ahmadnassri/action-semantic-release/releases
[release-img]: https://badgen.net/github/release/ahmadnassri/action-semantic-release

[super-linter-url]: https://github.com/ahmadnassri/action-semantic-release/actions?query=workflow%3Asuper-linter
[super-linter-img]: https://github.com/ahmadnassri/action-semantic-release/workflows/super-linter/badge.svg

[test-url]: https://github.com/ahmadnassri/action-semantic-release/actions?query=workflow%3Atest
[test-img]: https://github.com/ahmadnassri/action-semantic-release/workflows/test/badge.svg

[semantic-url]: https://github.com/ahmadnassri/action-semantic-release/actions?query=workflow%3Arelease
[semantic-img]: https://badgen.net/badge/📦/semantically%20released/blue
163 changes: 33 additions & 130 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,146 +19,49 @@ jobs:
uses: actions/checkout@v2

- name: semantic-release
uses: ahmadnassri/action-semantic-release@v1
uses: ahmadnassri/action-semantic-release@v2
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
```
### Inputs
#### `config` _(optional)_
| input | required | default | description |
| ----------- | -------- | ----------- | ---------------------------------------------------------------- |
| `config` | ❌ | [see docs] | File path to configuration file |
| `dry` | ❌ | `false` | Execute in "dry-run" mode |
| `debug` | ❌ | `false` | Output debugging information |
| `format` | ❌ | [see docs] | The Git tag format used by semantic-release to identify releases |
| `branches` | ❌ | [see docs] | The branches on which releases should happen |

File path to configuration file

> _**Note**: only use this if you're using a non-standard [configuration file name][config-file]_
> ⚠️ _**Note**: only use `config` if you're using a non-standard [configuration file name][config-file] and in **JSON format**_

### Outputs

#### `published`

> default: `true`

`'true'` when release is successfully published, `'false'` when nothing is published

#### `last-release-git-head`

> default: `da39a3ee5e6b4b0d3255bfef95601890afd80709`

The sha of the last commit being part of the last release

#### `last-release-git-tag`

> default: `v1.0.0`

The Git tag associated with the last release

#### `last-release-channel`

> default: `next`

The distribution channel on which the last release was initially made available (`undefined` for the default distribution channel)

#### `last-release-version`

> default: `1.0.0`

The version of the last release

#### `last-release-version-major`

> default: `1`

last release version major component

#### `last-release-version-minor`

> default: `0`

last release version minor component

#### `last-release-version-patch`

> default: `0`

last release version patch component

#### `last-release-version-prerelease`

> default: `-`

last release version prerelease component

#### `last-release-version-buildmetadata`

> default: `-`

last release version buildmetadata component

#### `release-type`

> default: `N/A`

The semver type of the release (patch, minor or major)

#### `release-git-head`

> default: `68eb2c4d778050b0701136ca129f837d7ed494d2`

The sha of the last commit being part of the new release

#### `release-git-tag`

> default: `v1.1.0`

The Git tag associated with the new release

#### `release-version`

> default: `1.1.0`

The version of the new release.

#### `release-notes`

> default: `...`

The release notes for the new release

#### `release-channel`

> default: `next`

The distribution channel on which the next release will be made available (`undefined` for the default distribution channel)

#### `release-version-major`

> default: `1`

last release version major component

#### `release-version-minor`

> default: `1`

last release version minor component

#### `release-version-patch`

> default: `0`

last release version patch component

#### `release-version-prerelease`

> default: `N/A`

last release version prerelease component

#### `release-version-buildmetadata`

> default: `N/A`

last release version buildmetadata component
| output | example | description |
| ------------------------------------ | -------- | ---------------------------------------------------------------- |
| `published` | `true` | `'true'` when release is successfully published, `'false'` when nothing is published
| `last-release-git-head` | `d80709` | The sha of the last commit being part of the last release
| `last-release-git-tag` | `v1.0.0` | The Git tag associated with the last release
| `last-release-channel` | `next` | The distribution channel on which the last release was initially made available _(`null` for the default distribution channel)_
| `last-release-version` | `1.0.0` | The version of the last release
| `last-release-version-major` | `1` | last release version major component
| `last-release-version-minor` | `0` | last release version minor component
| `last-release-version-patch` | `0` | last release version patch component
| `last-release-version-prerelease` | `-` | last release version prerelease component
| `last-release-version-buildmetadata` | `-` | last release version buildmetadata component
| `release-type` | `major` | The semver type of the release (patch, minor or major)
| `release-git-head` | `d494d2` | The sha of the last commit being part of the new release
| `release-git-tag` | `v1.1.0` | The Git tag associated with the new release
| `release-version` | `1.1.0` | The version of the new release.
| `release-notes` | `...` | The release notes for the new release
| `release-channel` | `next` | The distribution channel on which the next release will be made available _(`null` for the default distribution channel)_
| `release-version-major` | `1` | last release version major component
| `release-version-minor` | `1` | last release version minor component
| `release-version-patch` | `0` | last release version patch component
| `release-version-prerelease` | `-` | last release version prerelease component
| `release-version-buildmetadata` | `-` | last release version buildmetadata component

[config-file]: https://semantic-release.gitbook.io/semantic-release/usage/configuration#configuration-file
[see docs]: https://semantic-release.gitbook.io/semantic-release/usage/configuration#options
Loading

0 comments on commit 47b624c

Please sign in to comment.