javascript-project1
|- .github/workflows/publish.yml
|- folder1
|- folder2
|- package.json
|- ...
|- javascript-project2
|- package.json
|- ...
I want to only release inner javascript-project2 with semantic-release. I don't release javascript-project1.
Attach the package.json and publish.yml code for javascript-project1.
Is there a way to do this?
I already read this question and I've gotten help, but I haven't found a solution yet. semantic-release: is it possible to track and release a certain directory in a repo?
package.json
{
"name": "chroma",
"version": "0.0.0-development",
"workspaces": [
"package"
],
"author": "yujin",
"description": "",
"scripts": {
"dev": "next dev",
"build": "next build --debug && next export",
"startlocal": "next start",
"start": "next start -p 8002",
"lint": "next lint",
"acp": "git add . && git-cz && git push",
"commit": "git-cz",
"semantic-release": "semantic-release --branches main"
},
"repository": {
"type": "git",
"url": "https://github.com/eazel/chroma.git"
},
"bugs": {
"url": "https://github.com/eazel/chroma/issues"
},
"dependencies": {
"@next/bundle-analyzer": "^12.3.0",
"camera-controls": "^1.36.2",
"next": "^12.1.0",
"react": "^17.0.2",
"react-dom": "^17.0.2",
"sass": "^1.45.2",
"stats.js": "^0.17.0",
"styled-components": "^5.3.3",
"three": "^0.139.0",
"three-mesh-bvh": "^0.5.16"
},
"devDependencies": {
"@babel/core": "^7.15.8",
"@babel/preset-env": "^7.15.8",
"@semantic-release/github": "^8.0.7",
"@semantic-release/npm": "^10.0.2",
"@types/node": "^17.0.8",
"@types/react": "^17.0.38",
"@types/stats.js": "^0.17.0",
"@types/three": "^0.131.1",
"babel-loader": "^8.2.2",
"cz-conventional-changelog": "^3.3.0",
"eslint": "8.8.0",
"eslint-config-next": "12.0.10",
"html-webpack-plugin": "^5.3.2",
"next-compose-plugins": "^2.2.1",
"next-transpile-modules": "^9.0.0",
"semantic-release": "^21.0.0",
"ts-loader": "^9.2.6",
"typescript": "^4.4.2",
"webpack": "^5.58.1",
"webpack-cli": "^4.9.0",
"webpack-dev-server": "^4.3.1"
},
"release": {
"plugins": [
"@semantic-release/commit-analyzer",
"@semantic-release/release-notes-generator",
["@semantic-release/npm", {
"pkgRoot": "./package/"
}],
"@semantic-release/github"
],
"branches": [
"main"
]
},
"publishConfig": {
"registry": "https://npm.pkg.github.com/"
},
"main": "",
"config": {
"commitizen": {
"path": "./node_modules/cz-conventional-changelog"
}
}
}
publish.yml
name: Publish
on:
push:
branches: [ "main" ]
pull_request:
branches: "*"
permissions: write-all
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm ci
- run: npm run semantic-release
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}