Skip to content

Commit df87536

Browse files
committed
feat: add semantic release workflow and configuration
1 parent aa62bf7 commit df87536

3 files changed

Lines changed: 64 additions & 0 deletions

File tree

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Semantic Release
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
concurrency:
9+
group: release-${{ github.ref }}
10+
cancel-in-progress: false
11+
12+
jobs:
13+
release:
14+
name: Release
15+
runs-on: ubuntu-latest
16+
permissions:
17+
contents: write
18+
issues: write
19+
pull-requests: write
20+
steps:
21+
- name: Checkout repository
22+
uses: actions/checkout@v6
23+
with:
24+
fetch-depth: 0
25+
- name: Set up Node.js
26+
uses: actions/setup-node@v6
27+
with:
28+
node-version: 'lts/*'
29+
cache: 'npm'
30+
- name: Install Semantic Release
31+
run: >
32+
npm install
33+
semantic-release
34+
conventional-changelog-conventionalcommits
35+
@semantic-release/changelog
36+
@semantic-release/git
37+
- name: Verify Semantic Release
38+
run: npm audit signatures
39+
- name: Run Semantic Release
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42+
run: npx semantic-release

.releaserc.yaml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
branches:
3+
- main
4+
plugins:
5+
- - "@semantic-release/commit-analyzer"
6+
- preset: conventionalcommits
7+
- - "@semantic-release/release-notes-generator"
8+
- preset: conventionalcommits
9+
- "@semantic-release/github"
10+
- - "@semantic-release/changelog"
11+
- changelogTitle: '# Changelog'
12+
- - "@semantic-release/git"
13+
- assets:
14+
- CHANGELOG.md

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
A collection of GitHub composite actions and reusable workflows
44

5+
## Features
6+
7+
- [Semantic Release Workflow](#semantic-release-workflow)
8+
9+
### Semantic Release Workflow
10+
11+
[Semantic Release workflow](.github/workflows/semantic-release.yaml) using the Conventional Commits preset to automate versioning, generates [GitHub releases](https://github.com/bruzit/github-actions-and-workflows/releases), and updates the [CHANGELOG](CHANGELOG.md).
12+
513
## Copyright and Licensing
614

715
[MIT License](LICENSE)

0 commit comments

Comments
 (0)