diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..f7654d06 --- /dev/null +++ b/.github/workflows/release.yml @@ -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 }} diff --git a/packages/bson-bench/package.json b/packages/bson-bench/package.json index c6f9df2f..cb72d1ec 100644 --- a/packages/bson-bench/package.json +++ b/packages/bson-bench/package.json @@ -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", @@ -18,9 +23,5 @@ "license": "Apache-2.0", "dependencies": { "bson": "4.7" - }, - "directories": { - "lib": "lib", - "test": "test" } }