diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 012b36d..33d2394 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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: @@ -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 "username@users.noreply.github.com" + npm version ${{inputs.type}} - name: Get Package version id: version uses: zoexx/github-action-json-file-properties@release @@ -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 "username@users.noreply.github.com" 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 }}