Skip to content

Commit 09de69d

Browse files
committed
Add docs
1 parent d4b3175 commit 09de69d

4 files changed

Lines changed: 112 additions & 1 deletion

File tree

.github/workflows/semantic-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
node-version:
77
description: 'Node.js version to use'
88
required: false
9-
default: '20'
9+
default: '24'
1010
type: string
1111

1212
permissions:

docs/dependency-review.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# Dependency Review
2+
3+
Reusable workflow that runs [Dependency Review](https://github.com/actions/dependency-review-action) on pull requests. It checks dependency changes (e.g. in `package.json`, `package-lock.json`, `Pipfile`, `go.sum`) for known vulnerabilities and license issues.
4+
5+
## Inputs
6+
7+
None.
8+
9+
## Secrets
10+
11+
- `GITHUB_TOKEN` — Pass with `secrets: inherit` so the action can read the repo and comment on the PR.
12+
13+
## Usage
14+
15+
In your repo, add a workflow that runs on pull requests:
16+
17+
```yaml
18+
name: Dependency Review
19+
20+
on:
21+
pull_request:
22+
23+
jobs:
24+
dependency-review:
25+
uses: health-informatics-uon/workflows/.github/workflows/dependency-review.yml@main
26+
secrets: inherit
27+
```
28+
29+
Replace `@main` with the branch where this reusable workflow is defined.

docs/pr-title.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# PR Title Check
2+
3+
Reusable workflow that validates pull request titles using [action-semantic-pull-request](https://github.com/amannn/action-semantic-pull-request). Titles must follow a conventional-commit style (e.g. `feat: add login`, `fix: resolve crash`).
4+
5+
## Inputs
6+
7+
None.
8+
9+
## Secrets
10+
11+
- `GITHUB_TOKEN` — Pass with `secrets: inherit` so the action can read the PR and post status checks.
12+
13+
## Usage
14+
15+
In your repo, add a workflow that runs on pull requests:
16+
17+
```yaml
18+
name: PR Title Check
19+
20+
on:
21+
pull_request:
22+
23+
jobs:
24+
pr-title:
25+
uses: health-informatics-uon/workflows/.github/workflows/pr-title.yml@main
26+
secrets: inherit
27+
```
28+
29+
Replace `@main` with the branch where this reusable workflow is defined.

docs/semantic-release.md

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Semantic Release
2+
3+
Reusable workflow that runs [semantic-release](https://github.com/semantic-release/semantic-release) to determine the next version from commits and publish a GitHub release. Expects a [semantic-release config](https://github.com/semantic-release/semantic-release/blob/master/docs/usage/configuration.md) (e.g. `release.config.js` or `.releaserc`) in the calling repository.
4+
5+
## Inputs
6+
7+
| Input | Required | Default | Description |
8+
|----------------|----------|---------|----------------------------|
9+
| `node-version` | No | `'24'` | Node.js version to use. |
10+
11+
## Secrets
12+
13+
- `GITHUB_TOKEN` — Pass with `secrets: inherit` (or set explicitly) so the workflow can create releases and comment on PRs/issues.
14+
15+
## Usage
16+
17+
In your repo, add a workflow that runs on push to `main` (or your release branch):
18+
19+
```yaml
20+
name: Release
21+
22+
on:
23+
push:
24+
branches:
25+
- main
26+
27+
jobs:
28+
release:
29+
uses: health-informatics-uon/workflows/.github/workflows/semantic-release.yml@main
30+
with:
31+
node-version: '24' # optional
32+
secrets: inherit
33+
```
34+
35+
Ensure the branch in `@main` matches the branch where this reusable workflow is defined.
36+
37+
`release.config.js`
38+
39+
```json copy
40+
module.exports = {
41+
"branches": ["main"],
42+
"tagFormat": "${version}",
43+
"preset": "angular",
44+
"repositoryUrl": "https://github.com/Health-Informatics-UoN/nuh-helper.git",
45+
plugins: [
46+
'@semantic-release/commit-analyzer',
47+
'@semantic-release/release-notes-generator',
48+
'@semantic-release/exec',
49+
'@semantic-release/github',
50+
],
51+
"initialVersion": "0.0.1"
52+
};
53+
```

0 commit comments

Comments
 (0)