Skip to content

Commit 3ad7613

Browse files
committed
ci: remove publish job from CI workflow
Removed the publish job from the CI workflow configuration, which was responsible for publishing packages to npm registry upon version changes. 将发布作业从 CI 工作流配置中移除,该作业负责在版本更改时向 npm 注册表发布包。 Change-Id: I3e48a2a17559e06f04b04cac6af6d2f9b4bf6b94 Signed-off-by: OhYee <oyohyee@oyohyee.com>
1 parent af05a88 commit 3ad7613

1 file changed

Lines changed: 0 additions & 39 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -65,42 +65,3 @@ jobs:
6565
token: ${{ secrets.CODECOV_TOKEN }}
6666
files: ./coverage/coverage-final.json
6767
fail_ci_if_error: false
68-
69-
publish:
70-
runs-on: ubuntu-latest
71-
needs: [build, coverage]
72-
permissions:
73-
contents: read
74-
id-token: write
75-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
76-
77-
steps:
78-
- uses: actions/checkout@v4
79-
80-
- name: Use Node.js 18.x
81-
uses: actions/setup-node@v4
82-
with:
83-
node-version: 18.x
84-
registry-url: 'https://registry.npmjs.org'
85-
86-
- name: Clean and install dependencies
87-
run: |
88-
rm -rf node_modules package-lock.json
89-
npm install
90-
91-
- name: Build
92-
run: npm run build
93-
94-
# Only publish if version changed
95-
- name: Check version
96-
id: version
97-
run: |
98-
CURRENT_VERSION=$(node -p "require('./package.json').version")
99-
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
100-
101-
- name: Publish to npm
102-
if: steps.version.outputs.version != ''
103-
run: npm publish --access public
104-
env:
105-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
106-
continue-on-error: true

0 commit comments

Comments
 (0)