Skip to content

Commit

Permalink
ci: add semantic relase to automate release process (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
Extheoisah authored Aug 14, 2024
1 parent 71b125a commit 7698e0a
Show file tree
Hide file tree
Showing 4 changed files with 2,496 additions and 63 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: release

on:
workflow_dispatch:

jobs:
release:
permissions:
contents: write
issues: write
pull-requests: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: true

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20"

- name: Install dependencies
run: yarn install

- name: Build project
run: yarn build

- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
npx semantic-release
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@
},
"devDependencies": {
"@chromatic-com/storybook": "^1.5.0",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^10.1.4",
"@storybook/addon-essentials": "^8.1.10",
"@storybook/addon-interactions": "^8.1.10",
"@storybook/addon-links": "^8.1.10",
Expand All @@ -58,6 +60,7 @@
"postcss": "^8.4.38",
"react": "^17.0.0 || ^18.0.0",
"react-dom": "^17.0.0 || ^18.0.0",
"semantic-release": "^24.0.0",
"storybook": "^8.1.10",
"tailwindcss": "^3.4.4",
"tsup": "^8.1.0",
Expand Down
16 changes: 16 additions & 0 deletions release.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
module.exports = {
branches: ["main"],
plugins: [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
"@semantic-release/github",
[
"@semantic-release/git",
{
assets: ["dist/*"],
message:
"chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}",
},
],
],
};
Loading

0 comments on commit 7698e0a

Please sign in to comment.