Skip to content

Commit 9fc50d5

Browse files
committed
chore: update ci scripts
1 parent f739097 commit 9fc50d5

File tree

4 files changed

+29
-163
lines changed

4 files changed

+29
-163
lines changed

.github/workflows/autofix.yml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ on:
55
push:
66
branches:
77
- v2
8-
- v3
98

109
permissions:
1110
contents: read
@@ -14,11 +13,11 @@ jobs:
1413
autofix:
1514
runs-on: ubuntu-latest
1615
steps:
17-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@v5
1817
- run: npm i -g --force corepack && corepack enable
19-
- uses: actions/setup-node@v4
18+
- uses: actions/setup-node@v5
2019
with:
21-
node-version: 22
20+
node-version: "lts/*"
2221
cache: "pnpm"
2322
- run: pnpm install
2423
- run: pnpm stub

.github/workflows/ci.yml

Lines changed: 25 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,47 @@
11
name: ci
22

33
on:
4-
push:
5-
branches:
6-
- v2
7-
- v3
8-
pull_request:
9-
branches:
10-
- v2
11-
- v3
4+
push: { branches: [main] }
5+
pull_request: { branches: [main] }
126

137
jobs:
14-
lint:
15-
runs-on: ubuntu-latest
16-
steps:
17-
- uses: actions/checkout@v4
18-
with:
19-
fetch-depth: 0
20-
- run: npm i -g --force corepack && corepack enable
21-
- uses: actions/setup-node@v4
22-
with:
23-
node-version: 22
24-
cache: pnpm
25-
- run: pnpm install
26-
- run: pnpm stub
27-
- run: pnpm lint
28-
29-
ci:
8+
tests:
309
runs-on: ${{ matrix.os }}
3110
strategy:
3211
matrix:
3312
os: [ubuntu-latest, windows-latest]
3413

3514
steps:
36-
- uses: actions/checkout@v4
37-
with:
38-
fetch-depth: 0
15+
- uses: actions/checkout@v5
3916
- run: npm i -g --force corepack && corepack enable
40-
- uses: actions/setup-node@v4
41-
with:
42-
node-version: 22
43-
cache: pnpm
17+
- uses: actions/setup-node@v5
18+
with: { node-version: lts/*, cache: pnpm }
4419
- uses: oven-sh/setup-bun@v2
4520
if: ${{ matrix.os != 'windows-latest' }}
46-
with:
47-
bun-version: latest
21+
with: { bun-version: latest }
4822
- uses: denoland/setup-deno@v1
4923
if: ${{ matrix.os != 'windows-latest' }}
50-
with:
51-
deno-version: v2.x
24+
with: { deno-version: v2.x }
5225
- run: pnpm install
26+
- run: pnpm stub && pnpm lint
27+
if: ${{ matrix.os != 'windows-latest' }}
5328
- run: pnpm test:types
5429
if: ${{ matrix.os != 'windows-latest' }}
5530
- run: pnpm build
5631
- run: pnpm vitest --coverage
57-
env:
58-
NODE_OPTIONS: --experimental-vm-modules --enable-source-maps
5932
# - uses: codecov/codecov-action@v3
60-
- name: Release Nightly
61-
if: |
62-
github.event_name == 'push' &&
63-
!contains(github.event.head_commit.message, '[skip-release]') &&
64-
!startsWith(github.event.head_commit.message, 'chore') &&
65-
!startsWith(github.event.head_commit.message, 'docs')
66-
run: ./scripts/release-nightly.sh
67-
env:
68-
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
33+
34+
publish:
35+
runs-on: ubuntu-latest
36+
permissions: { id-token: write, contents: read }
37+
needs: tests
38+
if: contains('refs/heads/main', github.ref) && github.event_name == 'push'
39+
steps:
40+
- uses: actions/checkout@v5
41+
with: { fetch-depth: 0 }
42+
- run: npm i -fg corepack && corepack enable
43+
- uses: actions/setup-node@v5
44+
with: { node-version: lts/*, cache: "pnpm" }
45+
- run: pnpm install
46+
- run: pnpm changelogen --bump --canary nightly
47+
- run: npm i -g npm@latest && npm publish --tag latest

scripts/gen-mirror.ts

Lines changed: 0 additions & 106 deletions
This file was deleted.

scripts/release-nightly.sh

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,5 @@ if [[ ! -z ${NODE_AUTH_TOKEN} ]] ; then
2828
npm whoami
2929
fi
3030

31-
# Release packages
32-
33-
# nitropack-nightly@latest => v2
31+
# Publish to npm
3432
npm publish --access public --tolerate-republish --tag latest
35-
36-
# nitro-nightly@2x => v2-mirror
37-
cd .mirror
38-
npm publish --access public --tolerate-republish --tag 2x

0 commit comments

Comments
 (0)