chore(create-blocklet): use onConnect in did-connect-dapp (#366) #213
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Npm publish | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
check-files: | |
runs-on: ubuntu-latest | |
name: Check files changed | |
outputs: | |
changed-files: ${{ toJSON(steps.changed-files-docs.outputs) }} | |
bump-version: ${{ steps.changed-files-docs.outputs.only_changed == 'false' }} | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Get changed files in the docs folder | |
id: changed-files-docs | |
uses: tj-actions/changed-files@v31 | |
with: | |
files: | | |
website/** | |
publish: | |
if: needs.check-files.outputs.bump-version == 'true' | |
runs-on: ubuntu-latest | |
needs: | |
- check-files | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.GIT_HUB_TOKEN }} | |
- uses: pnpm/action-setup@v3 | |
with: | |
version: 9 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: 'pnpm' | |
- run: npm add -g @antfu/ni | |
- run: nci | |
- name: Publish to npm | |
run: | | |
npm config set '//registry.npmjs.org/:_authToken' "${{ secrets.NPM_TOKEN }}" | |
pnpm -r --filter "./plugins/*" --filter "./packages/create-app" exec npm publish --access public --no-git-checks | |
- name: get-npm-version | |
id: package-version | |
uses: martinbeentjes/npm-get-version-action@main | |
- name: Config Git | |
run: | | |
git config --local user.name "bot" | |
git config --local user.email "bot@arcblock.io" | |
- name: Git Tag | |
run: | | |
git tag -a v${{ steps.package-version.outputs.current-version }} -m "chore(release): v${{ steps.package-version.outputs.current-version }}" | |
git push origin v${{ steps.package-version.outputs.current-version }} | |
- run: npx conventional-github-releaser -p angular | |
env: | |
CONVENTIONAL_GITHUB_RELEASER_TOKEN: ${{secrets.GITHUB_TOKEN}} |