Skip to content

Commit

Permalink
ci: update workflows config.
Browse files Browse the repository at this point in the history
  • Loading branch information
jaywcjlove committed Nov 17, 2023
1 parent f63b44d commit d838641
Showing 1 changed file with 87 additions and 74 deletions.
161 changes: 87 additions & 74 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,16 @@ on:

jobs:
build-deploy:
runs-on: ubuntu-18.04
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v2
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
node-version: 18
registry-url: 'https://registry.npmjs.org'

- run: npm -v
- run: npm install
Expand All @@ -38,13 +42,13 @@ jobs:

- name: Create Tag
id: create_tag
uses: jaywcjlove/create-tag-action@v1.3.6
uses: jaywcjlove/create-tag-action@main
with:
package-path: ./packages/core/package.json

- name: get tag version
id: tag_version
uses: jaywcjlove/changelog-generator@v1.5.0
uses: jaywcjlove/changelog-generator@main

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
Expand All @@ -55,7 +59,7 @@ jobs:

- name: Generate Changelog
id: changelog
uses: jaywcjlove/changelog-generator@v1.5.0
uses: jaywcjlove/changelog-generator@main
with:
head-ref: ${{steps.create_tag.outputs.version}}
filter-author: (renovate-bot|Renovate Bot)
Expand Down Expand Up @@ -109,70 +113,79 @@ jobs:
| [@province-city-china/district-code](https://github.com/uiwjs/province-city-china/tree/master/packages/district-code) | 国内长途电话区号 | [![npm package](https://img.shields.io/npm/v/@province-city-china/district-code.svg)](https://www.npmjs.com/package/@province-city-china/district-code) | - |
- name: 📦 province-city-china publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: packages/core/package.json

- name: 📦 @province-city-china/area publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: packages/area/package.json

- name: 📦 @province-city-china/city publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: packages/city/package.json

- name: 📦 @province-city-china/country publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: packages/country/package.json

- name: 📦 @province-city-china/data publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: packages/data/package.json

- name: 📦 @province-city-china/district-code publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: packages/district-code/package.json

- name: 📦 @province-city-china/level publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: packages/level/package.json

- name: 📦 @province-city-china/province publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: packages/province/package.json

- name: 📦 @province-city-china/town publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: packages/town/package.json

- name: 📦 @province-city-china/types publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: packages/types/package.json

- name: 📦 @province-city-china/utils publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
package: packages/utils/package.json
- run: npm publish --access public --provenance
name: 📦 province-city-china publish to NPM
continue-on-error: true
working-directory: core
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: npm publish --access public --provenance
name: 📦 @province-city-china/area publish to NPM
continue-on-error: true
working-directory: area
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: npm publish --access public --provenance
name: 📦 @province-city-china/city publish to NPM
continue-on-error: true
working-directory: city
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: npm publish --access public --provenance
name: 📦 @province-city-china/country publish to NPM
continue-on-error: true
working-directory: country
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: npm publish --access public --provenance
name: 📦 @province-city-china/data publish to NPM
continue-on-error: true
working-directory: data
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: npm publish --access public --provenance
name: 📦 @province-city-china/district-code publish to NPM
continue-on-error: true
working-directory: district-code
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: npm publish --access public --provenance
name: 📦 @province-city-china/level publish to NPM
continue-on-error: true
working-directory: level
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: npm publish --access public --provenance
name: 📦 @province-city-china/province publish to NPM
continue-on-error: true
working-directory: province
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: npm publish --access public --provenance
name: 📦 @province-city-china/town publish to NPM
continue-on-error: true
working-directory: town
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: npm publish --access public --provenance
name: 📦 @province-city-china/types publish to NPM
continue-on-error: true
working-directory: types
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

- run: npm publish --access public --provenance
name: 📦 @province-city-china/utils publish to NPM
continue-on-error: true
working-directory: utils
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit d838641

Please sign in to comment.