Skip to content

Commit

Permalink
Merge pull request #1 from Viijay-Kr/chore-include-changesets
Browse files Browse the repository at this point in the history
chore: adding changesets for automating release
  • Loading branch information
Viijay-Kr authored Aug 28, 2024
2 parents 9b09019 + f7ff843 commit 314cbb3
Show file tree
Hide file tree
Showing 8 changed files with 88 additions and 5 deletions.
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -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)
11 changes: 11 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/friendly-brooms-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"mongodb-aggregation-dts": minor
---

first version with aggregation pipeline stages and operators
16 changes: 16 additions & 0 deletions .github/workflows/github_release.yml
Original file line number Diff line number Diff line change
@@ -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
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
with:
GITHUB_TOKEN: "${{ secrets.MY_GITHUB_TOKEN }}"
tag_prefix: "v"
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -173,4 +173,5 @@ dist

# Finder (MacOS) folder config
.DS_Store
types
types
mongodb-aggregation-dts-*.tgz
Binary file modified bun.lockb
Binary file not shown.
12 changes: 8 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "mongodb-aggregation-dts",
"description": "Type definitions for MongoDB aggregation pipelines and operators",
"version": "0.0.1",
"author": {
"email": "[email protected]",
"name": "Vijayakrishna Venkatesan",
Expand All @@ -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"
}
}

0 comments on commit 314cbb3

Please sign in to comment.