-
Notifications
You must be signed in to change notification settings - Fork 3
43 lines (40 loc) · 1.43 KB
/
release.yml
File metadata and controls
43 lines (40 loc) · 1.43 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Release
on:
push:
branches:
- main
permissions:
id-token: write # Required for OIDC / NPM Trusted Publishing (https://repos.openssf.org/trusted-publishers-for-all-package-repositories)
issues: write
contents: write
pull-requests: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: 24
registry-url: 'https://registry.npmjs.org'
- name: Update npm
run: npm install -g npm@latest # NPM Trusted Publishing requires npm 11.5.1 or later
- name: Install dependencies
run: npm ci
env:
HUSKY: 0 # Disable husky within CI/CD
- uses: googleapis/release-please-action@v4
id: release
with:
release-type: node
token: ${{ secrets.GITHUB_TOKEN }}
manifest-file: .release-please-manifest.json
- name: Build project
if: ${{ steps.release.outputs.release_created }}
run: npm run build
- name: Bundle tarball
if: ${{ steps.release.outputs.release_created }}
run: npm run package
- name: Publish to npm
if: ${{ steps.release.outputs.release_created }}
run: npm publish