Skip to content

Setup release-please #2

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

Merged
merged 1 commit into from
Mar 10, 2025
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
47 changes: 47 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Release

on:
push:
branches:
- main

permissions:
contents: write
pull-requests: write

jobs:
release:
runs-on: ubuntu-latest
outputs:
release_created: ${{ steps.release.outputs.release_created }}
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
config-file: release-please-config.json

publish:
runs-on: ubuntu-latest
needs: release
if: needs.release.outputs.release_created
steps:
- name: Checkout
uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: v22.x
registry-url: https://registry.npmjs.org
cache: pnpm

- name: Install dependencies
run: pnpm install

- name: Audit signatures
run: pnpm audit signatures

- name: Publish to registry
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: pnpm -r publish --access public
1 change: 1 addition & 0 deletions .npmrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
save-exact=true
git-checks=false
3 changes: 3 additions & 0 deletions .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"packages/bindbox": "0.0.1"
}
1 change: 1 addition & 0 deletions packages/bindbox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
}
},
"scripts": {
"prepare": "pnpm run build",
"build": "unbuild",
"test": "vitest",
"test:coverage": "vitest run --coverage --coverage.include=src"
Expand Down
40 changes: 40 additions & 0 deletions release-please-config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"$schema": "https://raw.githubusercontent.com/googleapis/release-please/main/schemas/config.json",
"release-type": "node",
"packages": {
"packages/bindbox": {
"component": "bindbox"
}
},
"pull-request-header": "Auto generated release",
"pull-request-title-pattern": "chore: release v${version}",
"group-pull-request-title-pattern": "chore: release ${component} v${version}",
"include-component-in-tag": false,
"include-v-in-tag": true,
"prerelease": true,
"versioning": "prerelease",
"bump-minor-pre-major": true,
"bump-patch-for-minor-pre-major": true,
"changelog-sections": [
{
"type": "feat",
"section": "Features",
"hidden": false
},
{
"type": "fix",
"section": "Bug Fixes",
"hidden": false
},
{
"type": "perf",
"section": "Performance Improvements",
"hidden": false
},
{
"type": "deps",
"section": "Dependencies",
"hidden": false
}
]
}