Skip to content

Commit

Permalink
feat: fix release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
saurav0705 committed Mar 16, 2024
1 parent 515eca4 commit a10ea52
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ jobs:
release:
name: Release pushed tag
runs-on: ubuntu-22.04
env:
CI_COMMIT_MESSAGE: 'feat: released a new version'
CI_COMMIT_AUTHOR: Continuous Integration
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -34,7 +37,10 @@ jobs:
run: yarn
- name: bump version
shell: bash
run: npm version ${{inputs.type}}
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "[email protected]"
npm version ${{inputs.type}}
- name: Get Package version
id: version
uses: zoexx/github-action-json-file-properties@release
Expand All @@ -43,17 +49,12 @@ jobs:
prop_path: 'version'
- name: commit to main
shell: bash
env:
CI_COMMIT_MESSAGE: 'feat: released a new version'
CI_COMMIT_AUTHOR: Continuous Integration
run: |
git config --global user.name "${{ env.CI_COMMIT_AUTHOR }}"
git config --global user.email "[email protected]"
git add .
git commit -m "${{env.CI_COMMIT_MESSAGE}}"
git tag -a ${{steps.version}} head -m "chore: released vserion ${{steps.version}}"
git push origin main
git push --tags
git push --tags origin main
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
Expand Down

0 comments on commit a10ea52

Please sign in to comment.