Skip to content

Commit

Permalink
chore: use nitropack-nightly for nightly release channel (#1841)
Browse files Browse the repository at this point in the history
  • Loading branch information
pi0 authored Oct 19, 2023
1 parent bfe1eaa commit 7165275
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
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

0 comments on commit 7165275

Please sign in to comment.