Skip to content
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

feat: add semver #73

Merged
merged 3 commits into from
Jan 7, 2024
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
6 changes: 6 additions & 0 deletions .commitlintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"extends": [
"@commitlint/config-angular"
],
"rules": {}
}
11 changes: 7 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ jobs:
run: yarn build
- name: Run tests
run: yarn test
- name: Release
- name: Version
if: github.ref == 'refs/heads/main'
run: |
alias npm=yarn
yarn semantic-release
run: yarn nx affected --base=last-release --target=version
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Tag last-release
if: github.ref == 'refs/heads/main'
run: |
git tag -f last-release
git push origin last-release --force
4 changes: 4 additions & 0 deletions .husky/commit-msg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

yarn run commitlint --edit "$1"
8 changes: 6 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,15 @@
"scripts": {
"test": "nx run-many --target=test",
"build": "nx run-many --target=build",
"semantic-release": "nx run-many --target=semantic-release --parallel=false"
"prepare": "husky install"
},
"devDependencies": {
"@theunderscorer/nx-semantic-release": "^2.7.1",
"@commitlint/cli": "^18.0.0",
"@commitlint/config-angular": "^18.0.0",
"@jscutlery/semver": "^4.2.0",
"@nx/devkit": "^17.2.8",
"@tsconfig/node20": "^20.1.2",
"husky": "^8.0.0",
"nx": "17.1.2"
}
}
Empty file.
10 changes: 1 addition & 9 deletions packages/config-eslint/project.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"name": "@utilz/config-eslint",
"targets": {
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"buildTarget": "@utilz/config-eslint:build",
"outputPath": "${PROJECT_DIR}"
}
}
}
"$schema": "../../node_modules/nx/schemas/project-schema.json"
}
Empty file.
10 changes: 1 addition & 9 deletions packages/config-prettier/project.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"name": "@utilz/config-prettier",
"targets": {
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"buildTarget": "@utilz/config-prettier:build",
"outputPath": "${PROJECT_DIR}"
}
}
}
"$schema": "../../node_modules/nx/schemas/project-schema.json"
}
10 changes: 1 addition & 9 deletions packages/deepmerge/project.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"name": "@utilz/deepmerge",
"targets": {
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"buildTarget": "${PROJECT_NAME}:build",
"outputPath": "${PROJECT_DIR}/output"
}
}
}
"$schema": "../../node_modules/nx/schemas/project-schema.json"
}
10 changes: 1 addition & 9 deletions packages/dummy/project.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"name": "@utilz/dummy",
"targets": {
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"buildTarget": "${PROJECT_NAME}:build",
"outputPath": "${PROJECT_DIR}/output"
}
}
}
"$schema": "../../node_modules/nx/schemas/project-schema.json"
}
10 changes: 1 addition & 9 deletions packages/file/project.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"name": "@utilz/file",
"targets": {
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"buildTarget": "${PROJECT_NAME}:build",
"outputPath": "${PROJECT_DIR}/output"
}
}
}
"$schema": "../../node_modules/nx/schemas/project-schema.json"
}
10 changes: 1 addition & 9 deletions packages/get/project.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"name": "@utilz/get",
"targets": {
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"buildTarget": "${PROJECT_NAME}:build",
"outputPath": "${PROJECT_DIR}/output"
}
}
}
"$schema": "../../node_modules/nx/schemas/project-schema.json"
}
10 changes: 1 addition & 9 deletions packages/github/project.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"name": "@utilz/github",
"targets": {
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"buildTarget": "${PROJECT_NAME}:build",
"outputPath": "${PROJECT_DIR}/output"
}
}
}
"$schema": "../../node_modules/nx/schemas/project-schema.json"
}
10 changes: 1 addition & 9 deletions packages/logger/project.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"name": "@utilz/logger",
"targets": {
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"buildTarget": "${PROJECT_NAME}:build",
"outputPath": "${PROJECT_DIR}/output"
}
}
}
"$schema": "../../node_modules/nx/schemas/project-schema.json"
}
10 changes: 1 addition & 9 deletions packages/merge/project.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"name": "@utilz/merge",
"targets": {
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"buildTarget": "${PROJECT_NAME}:build",
"outputPath": "${PROJECT_DIR}/output"
}
}
}
"$schema": "../../node_modules/nx/schemas/project-schema.json"
}
10 changes: 1 addition & 9 deletions packages/object/project.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"name": "@utilz/object",
"targets": {
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"buildTarget": "${PROJECT_NAME}:build",
"outputPath": "${PROJECT_DIR}/output"
}
}
}
"$schema": "../../node_modules/nx/schemas/project-schema.json"
}
10 changes: 1 addition & 9 deletions packages/tokenizer/project.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"name": "@utilz/tokenizer",
"targets": {
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"buildTarget": "${PROJECT_NAME}:build",
"outputPath": "${PROJECT_DIR}/output"
}
}
}
"$schema": "../../node_modules/nx/schemas/project-schema.json"
}
10 changes: 1 addition & 9 deletions packages/types/project.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
{
"name": "@utilz/types",
"targets": {
"semantic-release": {
"executor": "@theunderscorer/nx-semantic-release:semantic-release",
"options": {
"buildTarget": "${PROJECT_NAME}:build",
"outputPath": "${PROJECT_DIR}/output"
}
}
}
"$schema": "../../node_modules/nx/schemas/project-schema.json"
}
Loading