Skip to content

Commit

Permalink
chore: switch out changesets to semantic-release
Browse files Browse the repository at this point in the history
  • Loading branch information
filiptammergard committed Mar 5, 2024
1 parent 0743fba commit 6d93e2c
Show file tree
Hide file tree
Showing 6 changed files with 2,261 additions and 816 deletions.
9 changes: 0 additions & 9 deletions .changeset/README.md

This file was deleted.

14 changes: 0 additions & 14 deletions .changeset/config.json

This file was deleted.

11 changes: 3 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,8 @@ jobs:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write # to create release (changesets/action)
contents: write # to create release (semantic release)
id-token: write # to publish with provenance
issues: write # to post issue comments (changesets/action)
pull-requests: write # to create pull request (changesets/action)
steps:
- name: Checkout
uses: actions/checkout@v4
Expand All @@ -31,11 +29,8 @@ jobs:
- name: Install dependencies
run: yarn install --immutable

- name: Create release PR or publish to npm
uses: changesets/action@v1
with:
commit: "chore: version packages"
publish: yarn release
- name: Release
run: yarn semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
30 changes: 30 additions & 0 deletions .releaserc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
module.exports = {
branches: [
"+([0-9])?(.{+([0-9]),x}).x",
"main",
"next",
"next-major",
{ name: "beta", prerelease: true },
{ name: "alpha", prerelease: true },
],
plugins: [
[
"@semantic-release/commit-analyzer",
{
preset: "conventionalcommits",
},
],
"@semantic-release/github",
"@semantic-release/npm",
[
"@semantic-release/release-notes-generator",
{
preset: "conventionalcommits",
},
],
],
// disable updates to github PRs and issues due to successful releases
success: false,
// disable creation of github issues due to failed releases
fail: false,
}
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@
"lodash.merge": "4.6.2"
},
"devDependencies": {
"@changesets/cli": "2.27.1",
"@commitlint/cli": "19.0.3",
"@commitlint/config-conventional": "19.0.3",
"@einride/eslint-plugin": "7.9.0",
Expand Down Expand Up @@ -81,6 +80,7 @@
"react": "18.2.0",
"react-dom": "18.2.0",
"rollup": "4.12.0",
"semantic-release": "23.0.2",
"storybook": "7.6.17",
"tslib": "2.6.2",
"typescript": "5.3.3",
Expand Down
Loading

0 comments on commit 6d93e2c

Please sign in to comment.