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: setup nightly releases #467

Merged
merged 7 commits into from
Jul 27, 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
17 changes: 17 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ on:
branches:
- main

permissions:
id-token: write

jobs:
ci:
runs-on: ubuntu-latest
Expand All @@ -16,6 +19,8 @@ jobs:
node: [16, 18, 20]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: corepack enable
- uses: actions/setup-node@v3
with:
Expand All @@ -26,3 +31,15 @@ jobs:
- run: pnpm build
- run: pnpm vitest --coverage && rm -rf coverage/tmp
- uses: codecov/codecov-action@v3
- name: nightly release
if: |
github.event_name == 'push' &&
matrix.node == 20 &&
!contains(github.event.head_commit.message, '[skip-release]') &&
!contains(github.event.head_commit.message, 'docs')
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" >> ~/.npmrc &&
pnpm changelogen --canary nightly --publish
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_CONFIG_PROVENANCE: true
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,26 @@ yarn add h3
pnpm add h3
```

<details>
<summary>Using Nightly Releases</summary>

You can try latest changes of h3 landing to the `main` branch by using [`h3-nightly`](https://www.npmjs.com/package/h3-nightly) package.

You can directly swap from `h3` to `h3-nightly` for both dependency and imports, or use `resolutions` feature in `package.json` (recommanded):

```json
{
"dependencies": {
"h3": "latest"
},
"resolutions": {
"h3": "npm:h3-nightly@latest"
}
}
```

</details>

## Usage

```ts
Expand Down