diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 654bd25..313f5b2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,6 +4,8 @@ on: push: branches: - main + paths: + - '**/*.ts' pull_request: branches: - main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index cd32f5c..267c2ab 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -64,16 +64,16 @@ jobs: env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - name: Package binaries - run: pnpm package + - name: Commit and Push + run: | + git add CHANGELOG.md + git commit -m "chore: update changelog" + git push + - name: Upload Release Assets uses: softprops/action-gh-release@v1 with: - files: | - bin/ai-markdown-translator-linux - bin/ai-markdown-translator-macos - bin/ai-markdown-translator-win.exe body_path: CHANGELOG.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/bin/ai-markdown-translator-linux b/bin/ai-markdown-translator-linux deleted file mode 100644 index 3eaaafb..0000000 Binary files a/bin/ai-markdown-translator-linux and /dev/null differ diff --git a/bin/ai-markdown-translator-macos b/bin/ai-markdown-translator-macos deleted file mode 100644 index 6e35316..0000000 Binary files a/bin/ai-markdown-translator-macos and /dev/null differ diff --git a/bin/ai-markdown-translator-win.exe b/bin/ai-markdown-translator-win.exe deleted file mode 100644 index 574c1f8..0000000 Binary files a/bin/ai-markdown-translator-win.exe and /dev/null differ diff --git a/package.json b/package.json index 1ac780b..df79f9e 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,6 @@ "scripts": { "build": "tsc", "start": "node dist/index.js", - "package": "pkg .", "lint": "eslint . --ext .ts", "lint:fix": "eslint . --ext .ts --fix", "format": "prettier --write \"src/**/*.{js,jsx,ts,tsx,json,md}\"", @@ -19,14 +18,14 @@ "bin": { "ai-markdown-translator": "dist/index.js" }, - "pkg": { - "targets": [ - "node18-linux-x64", - "node18-macos-x64", - "node18-win-x64" - ], - "outputPath": "bin" - }, + "files": [ + "dist/index.js", + "src/**/*", + "LICENSE", + "README.md", + "README-zh.md", + "CHANGELOG.md" + ], "dependencies": { "axios": "^1.4.0", "dotenv": "^16.0.3", @@ -44,7 +43,6 @@ "eslint-config-prettier": "^8.0.0", "eslint-plugin-prettier": "^4.0.0", "husky": "^9.1.7", - "pkg": "^5.8.1", "prettier": "^2.0.0", "typescript": "^5.1.6" },