Skip to content

Commit

Permalink
fix: use semantic release again
Browse files Browse the repository at this point in the history
  • Loading branch information
Tjark-Kuehl committed Jul 21, 2022
1 parent ed59f82 commit ff68811
Show file tree
Hide file tree
Showing 8 changed files with 1,071 additions and 693 deletions.
8 changes: 0 additions & 8 deletions .changeset/README.md

This file was deleted.

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

This file was deleted.

2 changes: 1 addition & 1 deletion .eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
extends: [
'./packages/base'
'./packages/base',
],
rules: {
'unicorn/prefer-module': 'off',
Expand Down
24 changes: 2 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@ on:
- 'packages/*'
- '.changeset/*.md'
workflow_dispatch:
inputs:
forceRelease:
description: 'Forces to execute the release action without validating if theres a new version (true/false)'
required: true
default: 'false'

jobs:
release:
Expand All @@ -29,22 +24,7 @@ jobs:
- name: Install Node dependencies
uses: demvsystems/eslint-config-liebe/.github/actions/setup-node@main

- if: github.event.inputs.forceRelease != 'true'
name: Check Version
id: version
run: |
echo ::set-output name=changes::$(pnpm exec changeset version 2>&1 | grep -q 'No unreleased changesets found' && echo 'false' || echo 'true')
- if: steps.version.outputs.changes == 'true' && github.event.inputs.forceRelease != 'true'
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: Update version

- if: steps.version.outputs.changes == 'true' || github.event.inputs.forceRelease == 'true'
name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
with:
publish: pnpm release
- run: pnpm release
env:
GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
5 changes: 4 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,7 @@ jobs:
- name: Install Node dependencies
uses: demvsystems/eslint-config-liebe/.github/actions/setup-node@main

# - run: pnpm exec turbo run test lint
- run: pnpm release:dry
env:
NPM_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
GITHUB_TOKEN: ${{ secrets.PRIVATE_TOKEN }}
6 changes: 6 additions & 0 deletions .releaserc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": "semantic-release-monorepo",
"branches": [
"main"
]
}
13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,17 @@
"scripts": {
"prepare": "husky install",
"lint": "eslint . --ext .js,.ts,.json --fix",
"release": "changeset publish"
"release": "pnpm -r --workspace-concurrency=1 exec -- npx --no-install semantic-release -e semantic-release-monorepo",
"release:dry": "pnpm -r --workspace-concurrency=1 exec -- npx --no-install semantic-release -e semantic-release-monorepo --dry-run"
},
"devDependencies": {
"@changesets/changelog-github": "^0.4.5",
"@commitlint/cli": "17.0.3",
"@commitlint/config-conventional": "17.0.3",
"commitlint": "17.0.3",
"eslint": "^8",
"husky": "8.0.1"
"husky": "8.0.1",
"semantic-release": "^19.0.3",
"semantic-release-monorepo": "^7.0.5"
},
"packageManager": "[email protected]",
"dependencies": {
"@changesets/cli": "^2.23.2"
}
"packageManager": "[email protected]"
}
Loading

0 comments on commit ff68811

Please sign in to comment.