Skip to content

Commit

Permalink
Add semantic release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
thasmo committed Nov 25, 2024
1 parent a422825 commit 7bb3471
Show file tree
Hide file tree
Showing 7 changed files with 1,575 additions and 4 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: RELEASE

on:
push:
branches:
- main

jobs:
source:
name: verify source
uses: ./.github/workflows/source.yaml
release:
name: release version
runs-on: ubuntu-latest
needs: [source]
permissions:
issues: write
contents: write
pull-requests: write
steps:
- name: checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup package manager
uses: pnpm/action-setup@v4
with:
run_install: false
- name: install node
uses: actions/setup-node@v4
with:
cache: 'pnpm'
check-latest: true
node-version-file: '.nvmrc'
- name: install dependencies
run: pnpm install
- name: release version
run: pnpm exec semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .github/workflows/source.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: SOURCE

on:
workflow_call:
merge_group:
pull_request:
push:
Expand Down
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
engine-strict=true
tag-version-prefix=
preid=rc
access=public
6 changes: 6 additions & 0 deletions knip.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,10 @@
export default {
entry: ['configuration/*.js'],
ignoreDependencies: [
'@semantic-release/commit-analyzer',
'@semantic-release/github',
'@semantic-release/npm',
'@semantic-release/release-notes-generator',
],
project: ['configuration/**'],
};
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@
"husky": "^9.0.11",
"knip": "^5.13.0",
"lint-staged": "^15.2.2",
"prettier": "3.3.3"
"prettier": "3.3.3",
"semantic-release": "^24.2.0"
}
}
Loading

0 comments on commit 7bb3471

Please sign in to comment.