Skip to content

Commit 52fc86b

Browse files
committed
Merge branch 'main' into next
2 parents 7de6a97 + 6e75db9 commit 52fc86b

17 files changed

Lines changed: 3240 additions & 1206 deletions
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
name: Build & Publish Package
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
increment:
7+
required: true
8+
type: string
9+
preid:
10+
required: false
11+
type: string
12+
13+
env:
14+
NODE_VERSION: 22
15+
16+
jobs:
17+
build-and-publish:
18+
runs-on: ubuntu-24.04
19+
timeout-minutes: 5
20+
steps:
21+
- uses: actions/checkout@v5
22+
with:
23+
token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
24+
- uses: aboutbits/github-actions-base/git-setup@v2
25+
- uses: aboutbits/github-actions-node/build-and-publish-package@v3
26+
id: package
27+
with:
28+
node-version: ${{ env.NODE_VERSION }}
29+
registry-url: 'https://npm.pkg.github.com'
30+
registry-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
31+
increment: ${{ github.event.inputs.increment }}
32+
preid: ${{ github.event.inputs.preid }}
33+
- uses: aboutbits/github-actions-base/github-create-release@v2
34+
with:
35+
tag-name: 'v${{ steps.package.outputs.version }}'
36+
release-description: |
37+
```bash
38+
npm install ${{ steps.package.outputs.name }}@^${{ steps.package.outputs.version }}
39+
```
40+
release-notes-generation: 'true'

.github/workflows/main.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Test Package
1+
name: Main
22

33
on: push
44

@@ -8,16 +8,18 @@ concurrency:
88

99
jobs:
1010
checks:
11-
runs-on: ubuntu-22.04
11+
runs-on: ubuntu-24.04
1212
timeout-minutes: 10
1313
strategy:
1414
matrix:
15-
node_version: [16, 18, 20]
15+
node_version: [18, 20, 22]
1616
steps:
17-
- uses: actions/checkout@v4
18-
- uses: aboutbits/github-actions-node/setup-and-install@v2
17+
- uses: actions/checkout@v5
18+
- uses: aboutbits/github-actions-node/setup-and-install@v3
1919
with:
2020
node-version: ${{ matrix.node_version }}
21+
registry-url: 'https://npm.pkg.github.com'
22+
registry-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
2123
- name: Lint
2224
run: npm run lint
2325
shell: bash
@@ -26,16 +28,18 @@ jobs:
2628
shell: bash
2729

2830
test:
29-
runs-on: ubuntu-22.04
31+
runs-on: ubuntu-24.04
3032
timeout-minutes: 10
3133
strategy:
3234
matrix:
33-
node_version: [16, 18, 20]
35+
node_version: [18, 20, 22]
3436
steps:
35-
- uses: actions/checkout@v4
36-
- uses: aboutbits/github-actions-node/setup-and-install@v2
37+
- uses: actions/checkout@v5
38+
- uses: aboutbits/github-actions-node/setup-and-install@v3
3739
with:
3840
node-version: ${{ matrix.node_version }}
41+
registry-url: 'https://npm.pkg.github.com'
42+
registry-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
3943
- name: Test
4044
run: npm run test
4145
shell: bash

.github/workflows/pre-release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
name: Pre-Release Package
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
increment:
7+
description: "Version increment type"
8+
type: choice
9+
required: true
10+
default: "prepatch"
11+
options:
12+
- "premajor"
13+
- "preminor"
14+
- "prepatch"
15+
preid:
16+
description: "--preid"
17+
type: string
18+
required: true
19+
20+
jobs:
21+
build-and-publish:
22+
uses: ./.github/workflows/build-and-publish.yml
23+
with:
24+
increment: ${{ github.event.inputs.increment }}
25+
preid: ${{ github.event.inputs.preid }}
26+
secrets: inherit

.github/workflows/release.yml

Lines changed: 18 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,22 @@
1-
name: Create Relase & Publish Package
1+
name: Release Package
22

33
on:
4-
push:
5-
tags:
6-
- 'v*'
7-
8-
env:
9-
NODE_VERSION: 20
4+
workflow_dispatch:
5+
inputs:
6+
increment:
7+
description: "Version increment type"
8+
type: choice
9+
required: true
10+
default: "patch"
11+
options:
12+
- "major"
13+
- "minor"
14+
- "patch"
15+
- "prerelease"
1016

1117
jobs:
12-
build:
13-
runs-on: ubuntu-22.04
14-
timeout-minutes: 5
15-
steps:
16-
- uses: actions/checkout@v4
17-
- uses: actions/github-script@v7
18-
with:
19-
script: |
20-
github.rest.repos.createRelease({
21-
owner: context.repo.owner,
22-
repo: context.repo.repo,
23-
tag_name: '${{ github.ref }}',
24-
name: 'Release ${{ github.ref_name }}',
25-
prerelease: '${{ github.ref_name }}'.includes('-')
26-
})
27-
- uses: aboutbits/github-actions-node/setup-and-install@v2
28-
with:
29-
node-version: ${{ env.NODE_VERSION }}
30-
registry-url: 'https://registry.npmjs.org'
31-
- run: npm publish
32-
env:
33-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
18+
build-and-publish:
19+
uses: ./.github/workflows/build-and-publish.yml
20+
with:
21+
increment: ${{ github.event.inputs.increment }}
22+
secrets: inherit

.node-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
22

0 commit comments

Comments
 (0)