Skip to content

Commit

Permalink
chore: update workflows config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Aug 20, 2022
1 parent d688804 commit 2b78066
Showing 1 changed file with 35 additions and 2 deletions.
37 changes: 35 additions & 2 deletions .github/workflows/ci.yml
Expand Up @@ -6,7 +6,7 @@ on:

jobs:
build-deploy:
runs-on: ubuntu-18.04
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand Down Expand Up @@ -78,4 +78,37 @@ jobs:
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: ./core/package.json
package: ./core/package.json

outputs:
successful: ${{steps.create_tag.outputs.successful }}

github-package:
runs-on: ubuntu-22.04
needs: build-deploy
if: needs.build-deploy.outputs.successful
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://npm.pkg.github.com
scope: '@uiwjs'

- run: npm install
- working-directory: core
run: |
npm run build
npm run bundle
npm run bundle:min
- name: Modify package name
working-directory: core
shell: bash
run: |
node -e 'var pkg = require("./package.json"); pkg.name="@uiwjs/react-keywords"; require("fs").writeFileSync("./package.json", JSON.stringify(pkg, null, 2))'
- run: npm publish
working-directory: core
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 comments on commit 2b78066

Please sign in to comment.