Skip to content

Commit d4b3175

Browse files
committed
Initial workflow
1 parent d367e99 commit d4b3175

8 files changed

Lines changed: 132 additions & 0 deletions

File tree

.github/CODEOWNERS

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# This is a CODEOWNERS file. It defines who is responsible for different parts of the codebase.
2+
# See https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
3+
4+
# These owners will be the default owners for everything in the repo.
5+
* @AndyRae
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: Dependency Review (self)
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
dependency-review:
8+
uses: ./.github/workflows/dependency-review.yml
9+
secrets: inherit
10+
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Dependency Review
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
contents: read
8+
9+
jobs:
10+
dependency-review:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Checkout repository
15+
uses: actions/checkout@v4
16+
17+
- name: Dependency review
18+
uses: actions/dependency-review-action@v4
19+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
name: PR Title Check (self)
2+
3+
on:
4+
pull_request:
5+
6+
jobs:
7+
pr-title:
8+
uses: ./.github/workflows/pr-title.yml
9+
secrets: inherit
10+

.github/workflows/pr-title.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
name: PR Title Check
2+
3+
on:
4+
workflow_call:
5+
6+
permissions:
7+
pull-requests: read
8+
9+
jobs:
10+
pr-title:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- name: Validate PR title
15+
uses: amannn/action-semantic-pull-request@v5
16+
env:
17+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
18+

.github/workflows/release.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: Release (self)
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
release:
10+
uses: ./.github/workflows/semantic-release.yml
11+
with:
12+
node-version: '20'
13+
secrets: inherit
14+
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Semantic Release
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
node-version:
7+
description: 'Node.js version to use'
8+
required: false
9+
default: '20'
10+
type: string
11+
12+
permissions:
13+
contents: write
14+
pull-requests: write
15+
issues: write
16+
17+
jobs:
18+
release:
19+
runs-on: ubuntu-latest
20+
21+
steps:
22+
- name: Checkout code
23+
uses: actions/checkout@v4
24+
25+
- name: Set up Node.js
26+
uses: actions/setup-node@v4
27+
with:
28+
node-version: ${{ inputs.node-version }}
29+
30+
- name: Install Semantic Release and plugins
31+
run: |
32+
npm install -g semantic-release \
33+
@semantic-release/commit-analyzer \
34+
@semantic-release/exec \
35+
@semantic-release/release-notes-generator \
36+
@semantic-release/changelog \
37+
@semantic-release/github
38+
39+
- name: Run Semantic Release
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
run: semantic-release
43+

release.config.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
module.exports = {
2+
"branches": ["main"],
3+
"tagFormat": "${version}",
4+
"preset": "angular",
5+
"repositoryUrl": "https://github.com/Health-Informatics-UoN/nuh-helper.git",
6+
plugins: [
7+
'@semantic-release/commit-analyzer',
8+
'@semantic-release/release-notes-generator',
9+
'@semantic-release/exec',
10+
'@semantic-release/github',
11+
],
12+
"initialVersion": "0.0.1"
13+
};

0 commit comments

Comments
 (0)