Skip to content

Commit ff4e048

Browse files
committed
feat: add semantic release workflow
1 parent 0d8f8bd commit ff4e048

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Semantic Release
3+
4+
on:
5+
push:
6+
7+
jobs:
8+
release:
9+
name: Release
10+
runs-on: ubuntu-latest
11+
permissions:
12+
contents: write # to be able to publish a GitHub release
13+
issues: write # to be able to comment on released issues
14+
pull-requests: write # to be able to comment on released pull requests
15+
16+
steps:
17+
- name: Checkout repository
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
- name: Setup Node.js
22+
uses: actions/setup-node@v4
23+
with:
24+
node-version: "lts/*"
25+
- name: Install Semantic Release
26+
run: npm install --save-optional semantic-release conventional-changelog-conventionalcommits @semantic-release/changelog @semantic-release/git
27+
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
28+
run: npm audit signatures
29+
- name: Semantic Release
30+
env:
31+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
32+
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: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@
22

33
A collection of GitHub composite actions and reusable workflows.
44

5+
## Features
6+
7+
- [Semantic Release workflow](.github/workflows/semantic-release.yaml) using the Conventional Commits preset to automate versioning, generates [GitHub releases](https://github.com/xebis/github-actions-and-workflows/releases), and update the [CHANGELOG](CHANGELOG.md).
8+
59
## Credits and Acknowledgments
610

711
- Martin Bružina - Author

0 commit comments

Comments
 (0)