ci: refresh Vite+ setup action #55
This file contains hidden or 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: CI | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: ci-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Read Vite+ version | |
| id: vite_plus | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| version=$(jq -er '(.devDependencies["vite-plus"] // .dependencies["vite-plus"]) | sub("^[~^]"; "")' package.json) | |
| echo "version=${version}" >> "$GITHUB_OUTPUT" | |
| - name: Set up Vite+ | |
| uses: voidzero-dev/setup-vp@250f29ce396baf5e8f24498e17c0dfdebabc26eb # v1.15.0 | |
| with: | |
| version: ${{ steps.vite_plus.outputs.version }} | |
| node-version-file: ".node-version" | |
| cache: true | |
| - name: Run checks | |
| run: vp check | |
| - name: Run tests | |
| run: vp test | |
| - name: Build dist | |
| run: vp pack |