diff --git a/.github/workflows/release.yml b/.github/workflows/release-with-changeset.yml similarity index 95% rename from .github/workflows/release.yml rename to .github/workflows/release-with-changeset.yml index 5177a65a2..642f13e1a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release-with-changeset.yml @@ -2,7 +2,7 @@ # Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in the above-mentioned repo # It does magic only if there is a package.json file in the root of the project -name: Release - if Node project +name: Release with changeset on: push: @@ -106,6 +106,10 @@ jobs: name: Install dependencies shell: bash run: npm ci + - if: steps.packagejson.outputs.exists == 'true' + name: Install Changesets + run: npm install --save-dev @changesets/cli@2.26.1 + - if: steps.packagejson.outputs.exists == 'true' name: Create Release Pull Request or Release uses: changesets/action@v1 @@ -113,8 +117,8 @@ jobs: name: Publish to any of NPM, Github, and Docker Hub id: release with: - publish: npm run publish-packages - version: npm run version-packages + publish: npx turbo run build && npx changeset publish + version: npx changeset version commit: "version packages" title: "chore: version packages" env: diff --git a/package.json b/package.json index 6fef8c5ba..92d8bfc21 100644 --- a/package.json +++ b/package.json @@ -38,10 +38,7 @@ "generate:readme:toc": "markdown-toc -i \"README.md\"", "generate:assets": "npm run build && npm run generate:readme:toc", "bump:version": "npm --no-git-tag-version --allow-same-version version $VERSION", - "prepublishOnly": "npm run generate:assets", - "changeset": "changeset", - "version-packages": "changeset version", - "publish-packages": "turbo run build && changeset publish" + "prepublishOnly": "npm run generate:assets" }, "dependencies": { "@asyncapi/specs": "^6.7.1", @@ -91,8 +88,7 @@ "typescript": "^4.8.2", "webpack": "^5.74.0", "webpack-bundle-analyzer": "^4.6.1", - "webpack-cli": "^4.10.0", - "@changesets/cli": "^2.26.1" + "webpack-cli": "^4.10.0" }, "browserify": { "transform": [