Skip to content

Commit 8fe79c2

Browse files
Fix preleases and add pkg-pr-new
1 parent 502c916 commit 8fe79c2

File tree

5 files changed

+478
-9
lines changed

5 files changed

+478
-9
lines changed
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: Continuous releases
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
concurrency:
9+
group: ${{ github.workflow }}
10+
jobs:
11+
release:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout commit
15+
uses: actions/checkout@v4
16+
- name: Setup Node.js
17+
uses: actions/setup-node@v4
18+
with:
19+
node-version: 23
20+
cache: npm
21+
- name: Install dependencies
22+
run: npm ci
23+
- name: Release package on pkg.pr.new
24+
run: npx pkg-pr-new publish --compact --comment=off

.github/workflows/release.yml

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ on:
44
inputs:
55
increment:
66
description: "Release increment (e.g. patch, minor, major)"
7-
required: true
8-
default: "patch"
97
type: choice
108
options:
119
- patch
@@ -17,7 +15,6 @@ on:
1715
type: string
1816
concurrency:
1917
group: ${{ github.workflow }}
20-
run-name: Releasing a ${{ github.event.inputs.increment }} version
2118
jobs:
2219
release:
2320
runs-on: ubuntu-latest
@@ -29,7 +26,6 @@ jobs:
2926
with:
3027
node-version: 23
3128
cache: npm
32-
cache-dependency-path: "**/package-lock.json"
3329
- name: Setup git config
3430
run: |
3531
git config user.name "github-actions[bot]"
@@ -38,11 +34,14 @@ jobs:
3834
run: npm ci
3935
- name: Release package
4036
run: |
41-
ARGS="${{ github.event.inputs.increment }} --ci"
37+
ARGS=""
38+
if [[ -n "${{ github.event.inputs.increment }}" ]]; then
39+
ARGS+="${{ github.event.inputs.increment }}"
40+
fi
4241
if [[ -n "${{ github.event.inputs.prerelease }}" ]]; then
4342
ARGS+=" --preRelease=${{ github.event.inputs.prerelease }}"
4443
fi
45-
npm run release -- $ARGS
44+
npm run release -- $ARGS --ci
4645
env:
4746
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4847
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Tests
22
on:
33
pull_request:
44
workflow_dispatch:
@@ -22,7 +22,6 @@ jobs:
2222
with:
2323
node-version: 23
2424
cache: npm
25-
cache-dependency-path: "**/package-lock.json"
2625
- name: Install dependencies
2726
run: npm ci
2827
- name: Build package
@@ -40,7 +39,6 @@ jobs:
4039
with:
4140
node-version: 23
4241
cache: npm
43-
cache-dependency-path: "**/package-lock.json"
4442
- name: Install dependencies
4543
run: npm ci
4644
- name: Install Playwright

0 commit comments

Comments
 (0)