diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index d72ffe2c..ef7a46cd 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -6,8 +6,6 @@ on: branches: - main - next - paths: - - src/** concurrency: group: Release @@ -15,6 +13,8 @@ concurrency: permissions: contents: write + issues: write + pull-requests: write id-token: write jobs: @@ -24,6 +24,7 @@ jobs: - uses: actions/checkout@v6 with: fetch-depth: 0 + persist-credentials: false - uses: voidzero-dev/setup-vp@v1 with: @@ -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 diff --git a/AGENTS.md b/AGENTS.md index ecde314c..362b82a4 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -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 --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 --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