Skip to content

Commit

Permalink
Merge pull request #37 from ordermentum/add-changeset
Browse files Browse the repository at this point in the history
Add changeset
  • Loading branch information
sugendran authored Nov 1, 2024
2 parents 850a02b + 3f3fc08 commit 2e1c029
Show file tree
Hide file tree
Showing 6 changed files with 583 additions and 4 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/config@3.0.3/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
24 changes: 24 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: CI

on:
pull_request:
branches:
- main

jobs:
validate:
if: ${{ github.actor != 'renovate[bot]' }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Use Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- run: yarn
- run: yarn build
- run: yarn turbo run lint --parallel
- run: yarn test
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: Release
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v3

- name: Setup Node.js 18.x
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
env:
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
- run: yarn
- run: yarn build

- name: Run Tests
run: yarn test

- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: yarn release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"main": "build/index.js",
"license": "MIT",
"devDependencies": {
"@changesets/cli": "^2.27.9",
"@types/express": "4.17.13",
"@types/jsonwebtoken": "8.5.8",
"@types/node": "17.0.21",
Expand All @@ -21,7 +22,8 @@
"scripts": {
"build": "turbo run build --filter=@ordermentum/asap-core && turbo run build --filter=!@ordermentum/asap-core --parallel",
"lint": "turbo run lint --parallel -- --fix",
"test": "turbo run test"
"test": "turbo run test",
"release": "yarn build && changeset publish"
},
"dependencies": {},
"workspaces": [
Expand Down
Loading

0 comments on commit 2e1c029

Please sign in to comment.