Skip to content

Commit 3d4a283

Browse files
committed
chore: update workflow config.
1 parent 96c1582 commit 3d4a283

File tree

1 file changed

+30
-1
lines changed

1 file changed

+30
-1
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,4 +75,33 @@ jobs:
7575
- uses: JS-DevTools/npm-publish@v1
7676
with:
7777
token: ${{ secrets.NPM_TOKEN }}
78-
package: ./core/package.json
78+
package: ./core/package.json
79+
80+
outputs:
81+
successful: ${{steps.create_tag.outputs.successful }}
82+
83+
github-package:
84+
runs-on: ubuntu-18.04
85+
needs: build
86+
if: needs.build.outputs.successful
87+
steps:
88+
- uses: actions/checkout@v3
89+
- uses: actions/setup-node@v3
90+
with:
91+
node-version: 16
92+
registry-url: https://npm.pkg.github.com
93+
scope: '@uiwjs'
94+
95+
- run: npm install
96+
- run: npm run build
97+
98+
- name: Modify package name
99+
working-directory: core
100+
shell: bash
101+
run: |
102+
node -e 'var pkg = require("./package.json"); pkg.name="@uiwjs/react-code-preview-layout"; require("fs").writeFileSync("./package.json", JSON.stringify(pkg, null, 2))'
103+
104+
- run: npm publish
105+
working-directory: core
106+
env:
107+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)