Skip to content

Commit 9307f78

Browse files
author
Ahmad Nassri
committed
docs(readme): describe the action
1 parent 4de1106 commit 9307f78

File tree

2 files changed

+55
-1
lines changed

2 files changed

+55
-1
lines changed

README.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# GitHub Action: Semantic Release
2+
3+
[`semantic-release`](https://semantic-release.gitbook.io/) as a GitHub Action, with **all** presets included.
4+
5+
- works with environment variables as documented in [`semantic-release` docs](https://semantic-release.gitbook.io/semantic-release/usage/ci-configuration#authentication)
6+
- customizable through [`semantic-release` configuration](https://semantic-release.gitbook.io/semantic-release/usage/configuration) options
7+
8+
## Usage
9+
10+
```yaml
11+
on:
12+
push:
13+
branches: [ master ]
14+
15+
jobs:
16+
release:
17+
runs-on: ubuntu-latest
18+
19+
steps:
20+
- name: checkout
21+
uses: actions/checkout@v2
22+
23+
- name: semantic-release
24+
uses: docker://ahmadnassri/action-semantic-release:v1
25+
env:
26+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
```
29+
30+
### Outputs
31+
32+
| output | example | description |
33+
| ------------------------------------ | ------------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------- |
34+
| `published` | `true` | 'true' when release is successfully published, 'false' when nothing is published |
35+
| `last-release-git-head` | `da39a3ee5e6b4b0d3255bfef95601890afd80709` | The sha of the last commit being part of the last release |
36+
| `last-release-git-tag` | `v1.0.0` | The Git tag associated with the last release |
37+
| `last-release-channel` | `next` | The distribution channel on which the last release was initially made available (`undefined` for the default distribution channel) |
38+
| `last-release-version` | `1.0.0` | The version of the last release |
39+
| `last-release-version-major` | `1` | last release version major component |
40+
| `last-release-version-minor` | `0` | last release version minor component |
41+
| `last-release-version-patch` | `0` | last release version patch component |
42+
| `last-release-version-prerelease` | ` ` | last release version prerelease component |
43+
| `last-release-version-buildmetadata` | ` ` | last release version buildmetadata component |
44+
| `release-type` | ` ` | The semver type of the release (patch, minor or major) |
45+
| `release-git-head` | `68eb2c4d778050b0701136ca129f837d7ed494d2` | The sha of the last commit being part of the new release |
46+
| `release-git-tag` | `v1.1.0` | The Git tag associated with the new release |
47+
| `release-version` | `1.1.0` | The version of the new release. |
48+
| `release-notes` | `...` | The release notes for the new release |
49+
| `release-channel` | `next` | The distribution channel on which the next release will be made available (`undefined` for the default distribution channel) |
50+
| `release-version-major` | `1` | last release version major component |
51+
| `release-version-minor` | `1` | last release version minor component |
52+
| `release-version-patch` | `0` | last release version patch component |
53+
| `release-version-prerelease` | ` ` | last release version prerelease component |
54+
| `release-version-buildmetadata` | ` ` | last release version buildmetadata component |

action.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ runs:
1111

1212
outputs:
1313
published:
14-
description: "'true' when release is successfully published, 'false' when nothing is published"
14+
description: 'true' when release is successfully published, 'false' when nothing is published
1515

1616
last-release-git-head:
1717
description: The sha of the last commit being part of the last release

0 commit comments

Comments
 (0)