Skip to content

feat: switch from semantic-release to release-it #110

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Dec 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,17 @@ on:

jobs:
release:
name: Release
runs-on: ubuntu-latest
if: github.event.head_commit.message != 'Initial commit'
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/actions/prepare
- run: pnpm build
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- run: git config user.name "${GITHUB_ACTOR}"
- run: git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
- env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
- run: cat CHANGELOG.md
run: npm config set //registry.npmjs.org/:_authToken $NPM_TOKEN
- env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: pnpm release-it
15 changes: 15 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"git": {
"commitMessage": "chore: release v${version}"
},
"github": {
"release": true,
"releaseName": "v${version}"
},
"plugins": {
"@release-it/conventional-changelog": {
"infile": "CHANGELOG.md",
"preset": "conventionalcommits"
}
}
}
29 changes: 0 additions & 29 deletions .releaserc.json

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ It sets up the following tooling for you:
- [**Markdownlint**](https://github.com/DavidAnson/markdownlint): Static analysis for Markdown code.
- [**pnpm**](https://pnpm.io): Desk-efficient package manager alternative.
- [**Prettier**](https://prettier.io): Opinionated formatting for code, run on file save and as a Git commit hook via [husky](https://typicode.github.io/husky) and [lint-staged](https://github.com/okonet/lint-staged).
- [**release-it**](https://github.com/release-it/release-it): Generates changelogs, bumps the package version, and publishes to GitHub and npm based on [conventional commits](https://www.conventionalcommits.org).
- [**ts-prune**](https://github.com/nadeesha/ts-prune): Unused exports detection for TypeScript code.
- [**TypeScript**](https://typescriptlang.org): A typed superset of JavaScript, configured with strict compiler options.
- [**Vitest**](https://vitest.dev): Fast unit tests, configured with coverage tracking.
Expand Down
2 changes: 2 additions & 0 deletions cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
"codespace",
"commitlint",
"contributorsrc",
"conventionalcommits",
"infile",
"lcov",
"wontfix"
]
Expand Down
10 changes: 2 additions & 8 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,7 @@
"author": "Josh Goldberg <[email protected]>",
"description": "Template TypeScript Node.js package with all the CI bells & whistles I commonly use. ✨",
"devDependencies": {
"@semantic-release/changelog": "^6.0.1",
"@semantic-release/commit-analyzer": "^9.0.2",
"@semantic-release/exec": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^8.0.6",
"@semantic-release/npm": "^9.0.1",
"@semantic-release/release-notes-generator": "^10.0.3",
"@release-it/conventional-changelog": "^5.1.1",
"@typescript-eslint/eslint-plugin": "^5.38.1",
"@typescript-eslint/parser": "^5.38.1",
"@vitest/coverage-istanbul": "^0.25.8",
Expand All @@ -33,7 +27,7 @@
"npm-package-json-lint-config-default": "^5.0.0",
"pnpm-deduplicate": "^0.4.0",
"prettier": "^2.7.1",
"semantic-release": "^19.0.5",
"release-it": "^15.5.1",
"sentences-per-line": "^0.2.1",
"ts-prune": "^0.10.3",
"typescript": "^4.8.4",
Expand Down
Loading