Skip to content

Commit

Permalink
Integrate changesets into github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
adibmbrk committed Feb 11, 2025
1 parent 82bb767 commit e2a0446
Showing 1 changed file with 15 additions and 12 deletions.
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 "[email protected]"
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

0 comments on commit e2a0446

Please sign in to comment.