Skip to content

Commit

Permalink
chore(project): add semantic release
Browse files Browse the repository at this point in the history
  • Loading branch information
WilliamTraoreee committed Jul 7, 2023
1 parent 68b2485 commit 5eea041
Show file tree
Hide file tree
Showing 3 changed files with 65 additions and 3 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Release
on:
push:
branches:
- main

permissions:
contents: read # for checkout

jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to be able to publish a GitHub release
issues: write # to be able to comment on released issues
pull-requests: write # to be able to comment on released pull requests
id-token: write # to enable use of OIDC for npm provenance
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 clean-install
- name: Verify the integrity of provenance attestations and registry signatures for installed dependencies
run: npm audit signatures
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
17 changes: 17 additions & 0 deletions .releaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
[
"@semantic-release/git",
{
"assets": [
"dist/**/*.{js,css}",
"docs",
"package.json"
],
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
}
]
]
}
15 changes: 12 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "ui",
"private": true,
"version": "0.0.0",
"version": "0.0.0-development",
"type": "module",
"packageManager": "[email protected]",
"scripts": {
Expand All @@ -10,7 +10,8 @@
"preview": "vite preview",
"storybook": "storybook dev -p 6006",
"build-storybook": "storybook build",
"format": "prettier --write ./**/*.{js,jsx,ts,tsx,css,md,json} --config ./.prettierrc"
"format": "prettier --write ./**/*.{js,jsx,ts,tsx,css,md,json} --config ./.prettierrc",
"semantic-release": "semantic-release"
},
"dependencies": {
"@hello-pangea/dnd": "^16.2.0",
Expand Down Expand Up @@ -61,6 +62,14 @@
"storybook": "^7.0.26",
"tailwindcss": "^3.3.1",
"typescript": "^4.9.3",
"vite": "^4.2.0"
"vite": "^4.2.0",
"semantic-release": "^21.0.7"
},
"repository": {
"type": "git",
"url": "https://github.com/Streali/UI.git"
},
"publishConfig": {
"access": "restricted"
}
}

0 comments on commit 5eea041

Please sign in to comment.