Skip to content

Commit

Permalink
ci: create the GitHub Actions + Semantic Release
Browse files Browse the repository at this point in the history
  • Loading branch information
mrlemoos committed Mar 25, 2024
1 parent a81f87f commit 1d3bc03
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Release
on:
push:
branches:
- main

permissions:
contents: read

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
issues: write
pull-requests: write
id-token: write
steps:
- name: Checkout πŸ›ŽοΈ
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node.js πŸš€
uses: actions/setup-node@v3
with:
node-version: "lts/*"
- name: Install dependencies πŸ“¦
run: npm i -g pnpm && pnpm install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: pnpm audit signatures
- name: Update version and changelog πŸ“š
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: npx semantic-release
37 changes: 37 additions & 0 deletions release.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
/**
* @type {import('semantic-release').GlobalConfig}
*/
module.exports = {
branches: ['main'],
repositoryUrl: 'https://github.com/mrlemoos/mrlemoos.dev',
plugins: [
[
'@semantic-release/commit-analyzer',
{
preset: 'angular',
parserOpts: {
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'],
},
},
],
[
'@semantic-release/release-notes-generator',
{
preset: 'angular',
parserOpts: {
noteKeywords: ['BREAKING CHANGE', 'BREAKING CHANGES', 'BREAKING'],
},
writerOpts: {
commitsSort: ['subject', 'scope'],
},
},
],
[
'@semantic-release/git',
{
message:
'chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}',
},
],
],
};

0 comments on commit 1d3bc03

Please sign in to comment.