-
-
Notifications
You must be signed in to change notification settings - Fork 8.7k
ci: setup PR-driven release #23116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
ci: setup PR-driven release #23116
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
1754366
ci: setup PR-driven release
sapphi-red 112f490
ci: move the pr body generation to the script
sapphi-red 105a084
ci: extract PR step
sapphi-red 3264036
chore: update
sapphi-red e6a1095
chore: update
sapphi-red 10143fd
chore: bump
sapphi-red 84c63e4
chore: merge main
sapphi-red 358a98b
refactor: use github token
sapphi-red 1dd5633
chore: bump and simplify
sapphi-red 469a4aa
chore: merge main
sapphi-red File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| name: Prepare Release | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| package: | ||
| description: Package to release | ||
| required: true | ||
| default: vite | ||
| type: choice | ||
| options: | ||
| - vite | ||
| - create-vite | ||
| - plugin-legacy | ||
| release: | ||
| description: Release type | ||
| required: true | ||
| default: next | ||
| type: choice | ||
| options: | ||
| - next | ||
| - patch | ||
| - minor | ||
| - major | ||
| - prepatch | ||
| - preminor | ||
| - premajor | ||
| version: | ||
| description: Specify exact version instead of release type | ||
| required: false | ||
| type: string | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ inputs.package }}-${{ inputs.version || inputs.release }} | ||
| cancel-in-progress: false | ||
|
|
||
| permissions: {} | ||
|
|
||
| jobs: | ||
| prepare: | ||
| if: github.repository == 'vitejs/vite' | ||
| name: Prepare release PR | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| contents: write | ||
| pull-requests: write | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7 | ||
| with: | ||
| ref: main | ||
| fetch-depth: 0 | ||
| persist-credentials: false | ||
|
|
||
| - name: Install pnpm | ||
| uses: pnpm/action-setup@0ebf47130e4866e96fce0953f49152a61190b271 # v6.0.9 | ||
|
|
||
| - name: Set node version to 24 | ||
| uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7 | ||
| with: | ||
| node-version: 24 | ||
| package-manager-cache: false | ||
|
|
||
| - name: Install deps | ||
| run: pnpm install | ||
| env: | ||
| PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: "1" | ||
|
|
||
| - name: Prepare release | ||
| id: prepare | ||
| env: | ||
| RELEASE: ${{ inputs.version || inputs.release }} | ||
| RELEASE_PACKAGE: ${{ inputs.package }} | ||
| run: | | ||
| node scripts/prepare-release.ts "$RELEASE_PACKAGE" "$RELEASE" >> "$GITHUB_OUTPUT" | ||
|
|
||
| - name: Open release PR | ||
| uses: vitejs/release-scripts/action/release-pr@005dab4c647ff12519bfd076a595b2be33be8f6b # v1.9.2 | ||
| with: | ||
| token: ${{ github.token }} | ||
| package-name: ${{ inputs.package }} | ||
| package-path: packages/${{ inputs.package }} | ||
| pr-body: ${{ steps.prepare.outputs.pr_body }} | ||
| tag: ${{ steps.prepare.outputs.tag }} | ||
| version: ${{ steps.prepare.outputs.version }} |
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
This file was deleted.
Oops, something went wrong.
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
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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.