Skip to content

Commit

Permalink
✨ Setup and configure release-it
Browse files Browse the repository at this point in the history
  • Loading branch information
aryanprince committed Sep 25, 2024
1 parent ead8fb8 commit 3b2309d
Show file tree
Hide file tree
Showing 5 changed files with 3,397 additions and 1,853 deletions.
15 changes: 10 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: pnpm/action-setup@v4
name: Install pnpm
Expand All @@ -30,10 +32,13 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

- name: Create Release Pull Request and Publish to NPM
uses: changesets/action@v1
with:
publish: pnpm run release
- name: Git config
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- name: Create Release
run: pnpm run release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
node_modules
dist
.DS_Store
docker-compose.yml
docker-compose.yml
.npmrc
31 changes: 31 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://unpkg.com/release-it@17/schema/release-it.json",
"git": {
"commitMessage": "🔖 Release package v${version}"
},
"github": {
"release": true
},
"npm": {
"publish": true
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": {
"name": "conventionalcommits",
"types": [
{
"type": "feat",
"section": "Features"
},
{
"type": "fix",
"section": "Bug Fixes"
},
{}
]
},
"infile": "CHANGELOG.md"
}
}
}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,14 +32,16 @@
"changesets:generate": "changeset",
"changesets:release": "changeset version && changeset publish",
"ci": "pnpm run format:check && pnpm run build",
"release": "pnpm run ci && pnpm run changesets:release",
"release": "pnpm run ci && pnpm release-it --ci",
"prepublishOnly": "npm run ci"
},
"devDependencies": {
"@arethetypeswrong/cli": "^0.16.4",
"@changesets/cli": "^2.27.8",
"@release-it/conventional-changelog": "^8.0.2",
"@types/node": "^22.5.5",
"prettier": "^3.3.3",
"release-it": "^17.6.0",
"tsup": "^8.3.0",
"typescript": "^5.6.2"
},
Expand Down
Loading

0 comments on commit 3b2309d

Please sign in to comment.