From 33808c33e326e7ca84ff8e027b87d110c3c234e3 Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Tue, 14 May 2024 13:58:27 -0400 Subject: [PATCH 1/2] chore: add release automation --- .github/workflows/release.yml | 41 ++++++++++++++++++++++++++++++++ packages/bson-bench/package.json | 11 +++++---- 2 files changed, 47 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..bac2aa73 --- /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: google-github-actions/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" } } From 2866444f8e3a0aa6d74518db54a783c602a18791 Mon Sep 17 00:00:00 2001 From: Neal Beeken Date: Mon, 20 May 2024 14:11:41 -0400 Subject: [PATCH 2/2] chore: update source --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index bac2aa73..f7654d06 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - id: release - uses: google-github-actions/release-please-action@v4 + uses: googleapis/release-please-action@v4 - if: ${{ steps.release.outputs.release_created }} uses: actions/setup-node@v4