Skip to content

Commit

Permalink
Merge pull request #273 from adibmbrk/add-changeset
Browse files Browse the repository at this point in the history
  • Loading branch information
pavinduLakshan authored Feb 14, 2025
2 parents 07d4e7a + e2a0446 commit 90da85c
Show file tree
Hide file tree
Showing 4 changed files with 441 additions and 17 deletions.
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.5/schema.json",
"changelog": "@changesets/cli/changelog",
"commit": false,
"fixed": [],
"linked": [],
"access": "restricted",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
27 changes: 15 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,14 +59,25 @@ jobs:
run: |
yarn build
- name: Bump Version
- name: Setup Git User
run: |
git config --global user.email "version.bump@github.action.com"
git config --global user.name "asgardeo-github-bot"
yarn run bump-${{ github.event.inputs.Type }}-version
git push --follow-tags
- name: Create Release Pull Request or Publish
id: changesets
uses: changesets/action@v1
with:
publish: yarn publish:packages
version: yarn version:packages
commit: "[Asgardeo Release] [GitHub Actions] Update package versions"
title: "[Release] [GitHub Action] Update package versions"
env:
GITHUB_TOKEN: ${{ secrets.ASGARDIO_GITHUB_BOT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Pack Release Artifacts
if: steps.changesets.outputs.hasChangesets == 'false'
run: |
mkdir artifacts
if test -d samples
Expand All @@ -83,6 +94,7 @@ jobs:
fi
- name: Release Asgardeo Auth React SDK
if: steps.changesets.outputs.hasChangesets == 'false'
run: |
version=`git describe --tags --abbrev=0`
echo ${{secrets.ASGARDIO_GITHUB_BOT_TOKEN}} | gh auth login --with-token
Expand All @@ -92,12 +104,3 @@ jobs:
else
gh release create $version
fi
- name: Publish Asgardeo Auth React SDK
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc
cp README.md lib
cd lib
npm publish --access public
6 changes: 5 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@
"clean-all": "yarn run remove-package-lock && yarn run remove-yarn-lock && yarn run remove-node-modules",
"bump-patch-version": "lerna version patch --yes",
"bump-minor-version": "lerna version minor --yes",
"bump-major-version": "lerna version major --yes"
"bump-major-version": "lerna version major --yes",
"publish:packages": "changeset publish",
"version:packages": "changeset version",
"changeset": "changeset"
},
"repository": {
"type": "git",
Expand All @@ -35,6 +38,7 @@
},
"homepage": "https://github.com/asgardeo/asgardeo-auth-react-sdk#readme",
"devDependencies": {
"@changesets/cli": "^2.27.12",
"@typescript-eslint/eslint-plugin": "^5.47.0",
"@typescript-eslint/parser": "^5.47.0",
"eslint": "^8.30.0",
Expand Down
Loading

0 comments on commit 90da85c

Please sign in to comment.