Skip to content

fix: compatible with vite5 (#309) #174

fix: compatible with vite5 (#309)

fix: compatible with vite5 (#309) #174

Workflow file for this run

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@v3
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/**
upload:
if: "! contains(toJSON(github.event.commits.*.message), '[skip actions]')"
needs: check-files
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: pnpm/[email protected]
with:
version: latest
- uses: actions/setup-node@v2
with:
node-version: '16'
cache: 'pnpm'
- run: npm add -g @antfu/ni
- run: nci
# - name: Deploy Page Site
# uses: blocklet/action-workflow@v1
# with:
# skip-deps: false
# skip-bundle: false
# skip-upload: true
# skip-deploy: false
# skip-release: true
# deploy-app-did: zNKkQuRidtsBVskb8oDXKVh5PpM5uD5PKxim
# deploy-mount-point: /
# bundle-command: nr bundle
# working-directory: website/pages
# server-endpoint: ${{ secrets.XMARK_NODE_ENDPOINT }}
# server-access-key: ${{ secrets.XMARK_NODE_ACCESS_KEY }}
# server-access-secret: ${{ secrets.XMARK_NODE_ACCESS_SECRET }}
# slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
# - name: Deploy Docs Site
# uses: blocklet/action-workflow@v1
# with:
# skip-deps: true
# skip-bundle: false
# skip-upload: true
# skip-deploy: false
# skip-release: true
# deploy-app-did: zNKkQuRidtsBVskb8oDXKVh5PpM5uD5PKxim
# deploy-mount-point: /docs
# bundle-command: nr bundle
# working-directory: website/docs
# server-endpoint: ${{ secrets.XMARK_NODE_ENDPOINT }}
# server-access-key: ${{ secrets.XMARK_NODE_ACCESS_KEY }}
# server-access-secret: ${{ secrets.XMARK_NODE_ACCESS_SECRET }}
# slack-webhook: ${{ secrets.SLACK_WEBHOOK }}
publish:
if: needs.check-files.outputs.bump-version == 'true'
runs-on: ubuntu-latest
needs:
- check-files
- upload
steps:
- name: Checkout repo
uses: actions/checkout@v3
with:
token: ${{ secrets.GIT_HUB_TOKEN }}
- uses: pnpm/[email protected]
with:
version: latest
- uses: actions/setup-node@v2
with:
node-version: '16'
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 "[email protected]"
- 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}}