diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 0000000..e5b6d8d --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,8 @@ +# Changesets + +Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works +with multi-package repos, or single-package repos to help you version and publish your code. You can +find the full documentation for it [in our repository](https://github.com/changesets/changesets) + +We have a quick list of common questions to get you started engaging with this project in +[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md) diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 0000000..f9eb33f --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "main", + "updateInternalDependencies": "patch", + "ignore": [] +} \ No newline at end of file diff --git a/.changeset/friendly-brooms-jam.md b/.changeset/friendly-brooms-jam.md new file mode 100644 index 0000000..6a050d0 --- /dev/null +++ b/.changeset/friendly-brooms-jam.md @@ -0,0 +1,5 @@ +--- +"mongodb-aggregation-dts": minor +--- + +first version with aggregation pipeline stages and operators diff --git a/.github/workflows/github_release.yml b/.github/workflows/github_release.yml new file mode 100644 index 0000000..e384912 --- /dev/null +++ b/.github/workflows/github_release.yml @@ -0,0 +1,16 @@ +name: Create Github Release +on: + push: + tags: + - "v*" + +jobs: + release: + name: Create Github Release + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: "marvinpinto/action-automatic-releases@latest" + with: + repo_token: "${{ secrets.MY_GITHUB_TOKEN }}" + prerelease: false diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..e1f0631 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,38 @@ +name: Release +on: + push: + branches: + - main + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + name: Create Release PR or Publish + runs-on: ubuntu-latest + steps: + - name: Checkout Repo + uses:actions/checkout@v4 + + - name: Install bun + uses:oven-sh/setup-bun@v2 + + - name: Install Dependencies + run: bun install + - name: Create Release Pull Request or Publish to npm + id: changesets + uses: changesets/action@v1 + with: + # This expects you to have a script called release which does a build for your packages and calls changeset publish + publish: bun run release + env: + GITHUB_TOKEN: ${{ secrets.MY_GITHUB_TOKEN }} + NPM_TOKEN: ${{ secrets.NPM_TOKEN }} + + - name: Tag Version + id: tag_version + if: steps.publish.outcome == 'success' + uses: Klemensas/action-autotag@1.2.3 + with: + GITHUB_TOKEN: "${{ secrets.MY_GITHUB_TOKEN }}" + tag_prefix: "v" \ No newline at end of file diff --git a/.gitignore b/.gitignore index 39005fe..ee4f590 100644 --- a/.gitignore +++ b/.gitignore @@ -173,4 +173,5 @@ dist # Finder (MacOS) folder config .DS_Store -types \ No newline at end of file +types +mongodb-aggregation-dts-*.tgz \ No newline at end of file diff --git a/bun.lockb b/bun.lockb index d952c0e..fa760ea 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 7bc1b4d..1e21ad4 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,7 @@ { "name": "mongodb-aggregation-dts", "description": "Type definitions for MongoDB aggregation pipelines and operators", + "version": "0.0.1", "author": { "email": "vijayakrishna.venkatesan@gmail.com", "name": "Vijayakrishna Venkatesan", @@ -10,20 +11,23 @@ "url": "https://github.com/Viijay-Kr/mongodb-aggregation-dts" }, "license": "MIT", - "version": "0.0.1", "devDependencies": { "@types/bun": "latest" }, "peerDependencies": { "typescript": ">=5.0.0", - "mongodb": "^6.8.0" + "mongodb": ">=5.0.0" }, "files": [ "types" ], "scripts": { - "compile": "tsc" + "compile": "tsc", + "release": "bun run compile && changeset publish" }, "type": "module", - "types": "types/mongodb.d.ts" + "types": "types/mongodb.d.ts", + "dependencies": { + "@changesets/cli": "^2.27.7" + } } \ No newline at end of file