Skip to content

Commit

Permalink
🐛 release action
Browse files Browse the repository at this point in the history
  • Loading branch information
takuma-ru committed Jun 7, 2024
1 parent f6a38c3 commit 5c967a7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions packages/release/src/action/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { join } from "node:path";
import consola from "consola";
import { z } from "zod";
import { BUILD_CMD, PACKAGE_JSON_PATH } from "../constants/config";
Expand All @@ -21,9 +22,9 @@ export const releaseAction = async (options: unknown) => {
cmd(BUILD_CMD);

// Commit and push the changes
cmd(`git add ${PACKAGE_JSON_PATH}`);
cmd(`git add ${join(__dirname, PACKAGE_JSON_PATH)}`);
cmd(`git commit -m "Release version ${newVersion}"`);
cmd("git push origin HEAD");
cmd(`git push origin ${branchName}`);

// Publish the package
cmd(
Expand Down
4 changes: 2 additions & 2 deletions packages/release/src/action/packageVersionUp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export const packageVersionUp = ({ level, pre }: ReleaseSchemaType) => {
consola.info(`New version: ${packageJson.version}`);

return {
newVersion: packageJson.version,
packageName: packageJson.name,
newVersion: packageJson.version as string,
packageName: packageJson.name as string,
};
};
4 changes: 4 additions & 0 deletions unplugin-lit-sass.code-workspace
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@
"name": "p:unplugin",
"path": "packages/unplugin"
},
{
"name": "p:release",
"path": "packages/release"
},
{
"name": "----------",
"path": "b"
Expand Down

0 comments on commit 5c967a7

Please sign in to comment.