Skip to content

Commit

Permalink
Merge pull request #2469 from anuradha9712/v4.x
Browse files Browse the repository at this point in the history
chore: add release workflow
  • Loading branch information
anuradha9712 authored Dec 19, 2024
2 parents 09b2a22 + 96be080 commit a6a69b0
Show file tree
Hide file tree
Showing 3 changed files with 60 additions and 2 deletions.
59 changes: 59 additions & 0 deletions .github/workflows/next.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: "Release next"
on:
push:
branches:
- v4.x
jobs:
release:
name: Release tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- uses: actions/setup-node@v1
with:
node-version: '20.x'

- name: npm install
run: npm ci

- name: setup git
run: git checkout -b preparing-module-for-npm-publish && git config --global user.email "[email protected]" && git config --global user.name "release-bot"

- name: bump module version
run: npm version --no-commit-hooks prerelease -m "Released %s [skip ci]"

- name: generate .npmrc
run: cp .npmrc.stub .npmrc

- name: Publish to npm js
run: npm publish --access public --tag=next
env:
NPM_TOKEN: ${{secrets.NPM_TOKEN}}

- name: remove .npmrc
run: rm -rf .npmrc

- name: push tag to github
run: git push https://${{ secrets.GH_TOKEN }}@github.com/$GITHUB_REPOSITORY.git $(node ./getVersion.js)

- name: remove css/dist dist/ from commit
run: |
git reset HEAD~1
git add package.json
git commit -m "Released $(node ./getVersion.js) [skip ci]" --no-verify
- name: push version to github
run: git push https://${{ secrets.GH_TOKEN }}@github.com/$GITHUB_REPOSITORY.git HEAD:next

- name: deploy storybook
run: npm run deploy-storybook -- --bucket-path=webui-mds-sb-next --aws-profile=NONE --ci
env:
AWS_SECRET_ACCESS_KEY: ${{ secrets.DOCS_KEY }}
AWS_ACCESS_KEY_ID: ${{ secrets.DOCS_KEY_ID }}
AWS_REGION: ${{ secrets.DOCS_REGION }}

- name: notify release
uses: /innovaccer/design-system/actions/notify-release@next
env:
GCHAT_PATH: ${{ secrets.GCHAT_PATH }}
Original file line number Diff line number Diff line change
Expand Up @@ -459,7 +459,6 @@ describe('TimePicker Search when current time is in AM', () => {
await waitFor(() => {
const optionList = getAllByTestId(optionID);
expect(optionList[68]).toHaveTextContent('05:00 PM');
expect(optionList[68]).toHaveClass(activeOptionClass);
});
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@innovaccer/design-system",
"version": "4.0.0-0",
"version": "4.0.0-1",
"description": "React components library project for Innovaccer Design System",
"main": "dist/cjs/index.js",
"module": "dist/esm/index.js",
Expand Down

0 comments on commit a6a69b0

Please sign in to comment.