Skip to content
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

chore: use nitropack-nightly for nightly release channel #1841

Merged
merged 3 commits into from
Oct 19, 2023
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
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,12 +55,12 @@ jobs:
env:
NODE_OPTIONS: --experimental-vm-modules --enable-source-maps
- uses: codecov/codecov-action@v3
- name: Release Edge
- name: Release Nightly
if: |
github.event_name == 'push' &&
!contains(github.event.head_commit.message, '[skip-release]') &&
!contains(github.event.head_commit.message, 'chore') &&
!contains(github.event.head_commit.message, 'docs')
run: ./scripts/release-edge.sh
run: ./scripts/release-nightly.sh
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
10 changes: 5 additions & 5 deletions docs/content/1.guide/0.getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,18 +94,18 @@ npm run preview
```


## Edge Release Channel
## Nightly Release Channel

Nitro offers an edge release channel that automatically releases for every commit to `main` branch.
Nitro offers a nightly release channel that automatically releases for every commit to `main` branch.

You can opt-in to the edge release channel by updating your `package.json`:
You can opt-in to the nightly release channel by updating your `package.json`:

::code-group
```diff [Nitro]
{
"devDependencies": {
-- "nitropack": "^2.0.0"
++ "nitropack": "npm:nitropack-edge@latest"
++ "nitropack": "npm:nitropack-nightly@latest"
}
}
```
Expand All @@ -120,7 +120,7 @@ You can opt-in to the edge release channel by updating your `package.json`:
::

::alert
If you are using Nuxt, [use the Nuxt edge channel](https://nuxt.com/docs/guide/going-further/edge-channel#opting-into-the-edge-channel) as it already includes `nitropack-edge`.
If you are using Nuxt, [use the Nuxt nightly channel](https://nuxt.com/docs/guide/going-further/nightly-release-channel#opting-in) as it already includes `nitropack-nightly`.
::

Remove the lockfile (`package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, or `bun.lockb`) and reinstall the dependencies.
2 changes: 1 addition & 1 deletion scripts/bump-edge.ts β†’ scripts/bump-nightly.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ async function main() {
pkg.data.name,
`${pkg.data.version}-${date}.${commit}`
);
workspace.rename(pkg.data.name, pkg.data.name + "-edge");
workspace.rename(pkg.data.name, pkg.data.name + "-nightly");
pkg.updateDeps((dep) => {
if (nightlyPackages[dep.name]) {
dep.range = "npm:" + nightlyPackages[dep.name] + "@latest";
Expand Down
4 changes: 2 additions & 2 deletions scripts/release-edge.sh β†’ scripts/release-nightly.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ git restore -s@ -SW -- .
# Bump acording to changelog
pnpm changelogen --bump

# Bump versions to edge
pnpm jiti ./scripts/bump-edge
# Bump versions to nightly
pnpm jiti ./scripts/bump-nightly

# Resolve lockfile
# pnpm install
Expand Down