Skip to content
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

chore: add release automation #12

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
41 changes: 41 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
on:
push:
branches: [main]
workflow_dispatch: {}

permissions:
contents: write
pull-requests: write
id-token: write

name: release

jobs:
release-please:
runs-on: ubuntu-latest
steps:
- id: release
uses: googleapis/release-please-action@v4

- if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-node@v4
with:
node-version: 'lts/*'
cache: 'npm'
registry-url: 'https://npm.pkg.github.com'

- if: ${{ steps.release.outputs.release_created }}
run: npm install -g npm@latest
shell: bash

- if: ${{ steps.release.outputs.release_created }}
run: npm clean-install
shell: bash

- if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4

- if: ${{ steps.release.outputs.release_created }}
run: npm publish --workspaces
env:
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
11 changes: 6 additions & 5 deletions packages/bson-bench/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,12 @@
"name": "bson-bench",
"version": "0.0.1",
"description": "benchmarking tool for bson",
"private": true,
"files": [
"lib",
"src",
"etc/prepare.js",
"tsconfig.json"
],
"main": "./lib/index.js",
"scripts": {
"build": "npx tsc -p ./tsconfig.json",
Expand All @@ -18,9 +23,5 @@
"license": "Apache-2.0",
"dependencies": {
"bson": "4.7"
},
"directories": {
"lib": "lib",
"test": "test"
}
}
Loading