Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 9 additions & 48 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,15 @@ on:
branches:
- main
- next
paths:
- src/**

concurrency:
group: Release
cancel-in-progress: false

permissions:
contents: write
issues: write
pull-requests: write
id-token: write

jobs:
Expand All @@ -24,6 +24,7 @@ jobs:
- uses: actions/checkout@v6
with:
fetch-depth: 0
persist-credentials: false

- uses: voidzero-dev/setup-vp@v1
with:
Expand All @@ -32,50 +33,10 @@ jobs:

- run: vp check
- run: vp test
- run: vp pack

- name: Find the current version
id: current
shell: bash
run: |
tag="$(git describe --tags --abbrev=0 --match 'v[0-9]*' 2>/dev/null || true)"

if [[ -n "$tag" ]]; then
echo "version=${tag#v}" >> "$GITHUB_OUTPUT"

if [[ "$(git rev-list -n 1 "$tag")" == "$GITHUB_SHA" ]]; then
echo "release=false" >> "$GITHUB_OUTPUT"
exit 0
fi
else
echo "version=0.0.0" >> "$GITHUB_OUTPUT"
fi

echo "release=true" >> "$GITHUB_OUTPUT"

- name: Apply the conventional version
if: steps.current.outputs.release == 'true'
run:
vp exec bumpp --release conventional --current-version "${{
steps.current.outputs.version }}" --yes --no-commit --no-tag --no-push

- name: Build the package
if: steps.current.outputs.release == 'true'
run: vp pack

- name: Publish the package
if: steps.current.outputs.release == 'true'
run: vp pm publish --access public --provenance --no-git-checks

- name: Test publishing the package
if: steps.current.outputs.release == 'true'
run: vp pm publish --dry-run --no-git-checks

- name: Tag the release
if: steps.current.outputs.release == 'true'
shell: bash
run: |
version="$(node --print "JSON.parse(require('node:fs').readFileSync('package.json', 'utf8')).version")"
git config user.name "github-actions[bot]"
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
git tag --annotate "v$version" --message "Release v$version" "$GITHUB_SHA"
git push origin "v$version"
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: vp exec semantic-release
16 changes: 4 additions & 12 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,15 @@

# Using Vite+, the Unified Toolchain for the Web

This project is using Vite+, a unified toolchain built on top of Vite, Rolldown,
Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management,
package management, and frontend tooling in a single global CLI called `vp`.
Vite+ is distinct from Vite, and it invokes Vite through `vp dev` and
`vp build`. Run `vp help` to print a list of commands and `vp <command> --help`
for information about a specific command.
This project is using Vite+, a unified toolchain built on top of Vite, Rolldown, Vitest, tsdown, Oxlint, Oxfmt, and Vite Task. Vite+ wraps runtime management, package management, and frontend tooling in a single global CLI called `vp`. Vite+ is distinct from Vite, and it invokes Vite through `vp dev` and `vp build`. Run `vp help` to print a list of commands and `vp <command> --help` for information about a specific command.

Docs are local at `node_modules/vite-plus/docs` or online at
https://viteplus.dev/guide/.
Docs are local at `node_modules/vite-plus/docs` or online at https://viteplus.dev/guide/.

## Review Checklist

- [ ] Run `vp install` after pulling remote changes and before getting started.
- [ ] Run `vp check` and `vp test` to format, lint, type check and test changes.
- [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts
necessary for validation, run via `vp run <script>`.
- [ ] If setup, runtime, or package-manager behavior looks wrong, run
`vp env doctor` and include its output when asking for help.
- [ ] Check if there are `vite.config.ts` tasks or `package.json` scripts necessary for validation, run via `vp run <script>`.
- [ ] If setup, runtime, or package-manager behavior looks wrong, run `vp env doctor` and include its output when asking for help.

<!--VITE PLUS END-->