From 483b32c0ac81cfdefaeaa27a7241488d0fc9fdde Mon Sep 17 00:00:00 2001 From: jaywcjlove <398188662@qq.com> Date: Mon, 25 Mar 2024 15:11:54 +0800 Subject: [PATCH] ci: update workflow config. --- .github/workflows/ci.yml | 36 +++++++++++++++++++++--------------- package.json | 2 +- 2 files changed, 22 insertions(+), 16 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index f84e0b1e..07c5286b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -10,6 +10,9 @@ env: jobs: build-deploy: runs-on: ubuntu-latest + permissions: + contents: write + id-token: write steps: - uses: actions/checkout@v4 - uses: actions/setup-node@v4 @@ -33,21 +36,6 @@ jobs: output: build/CONTRIBUTORS.svg avatarSize: 42 - # - run: npm install @jsdevtools/npm-publish -g - # - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json - - - run: npm publish --access public --provenance - name: 📦 @uiw/react-code-preview publish to NPM - continue-on-error: true - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - # - name: 📦 📦 @uiw/react-code-preview 📦 📦 - # uses: JS-DevTools/npm-publish@v1 - # with: - # token: ${{ secrets.NPM_TOKEN }} - # package: package.json - - name: Create Tag id: create_tag uses: jaywcjlove/create-tag-action@main @@ -94,3 +82,21 @@ jobs: ``` ${{ steps.changelog.outputs.changelog }} + - name: package.json info + uses: jaywcjlove/github-action-package@main + with: + unset: scripts,lint-staged,eslintConfig,browserslist + # - run: npm install @jsdevtools/npm-publish -g + # - run: npm-publish --token="${{ secrets.NPM_TOKEN }}" ./package.json + + - run: npm publish --access public --provenance + name: 📦 @uiw/react-code-preview publish to NPM + continue-on-error: true + env: + NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }} + + # - name: 📦 📦 @uiw/react-code-preview 📦 📦 + # uses: JS-DevTools/npm-publish@v1 + # with: + # token: ${{ secrets.NPM_PUBLISH_TOKEN }} + # package: package.json diff --git a/package.json b/package.json index c36a0ef4..e98853d0 100644 --- a/package.json +++ b/package.json @@ -23,7 +23,7 @@ "homepage": "https://uiwjs.github.io/react-code-preview", "repository": { "type": "git", - "url": "https://github.com/uiwjs/react-code-preview" + "url": "git+https://github.com/uiwjs/react-code-preview.git" }, "files": [ "src",