Up version to v0.24.0 [release] #39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Up version | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: write | |
| jobs: | |
| run: | |
| name: up-version | |
| runs-on: ubuntu-latest | |
| if: ${{ github.actor != 'robot-charts' }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.GH_TOKEN }} | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: up version | |
| id: version | |
| run: | | |
| echo "actor: ${{ github.actor }}" | |
| VERSION=$(npm version minor --no-commit-hooks --no-git-tag-version) | |
| echo "version: ${VERSION}" | |
| echo "version=${VERSION}" >> $GITHUB_OUTPUT | |
| - name: git config | |
| run: | | |
| git config user.name "GitHub Actions" | |
| git config user.email noreply@github.com | |
| - name: commit version | |
| run: | | |
| VERSION=${{ steps.version.outputs.version }} | |
| git add package.json | |
| git add package-lock.json | |
| git commit -a -m "Up version to ${VERSION} [release]" | |
| git push | |
| - name: create tag | |
| run: | | |
| VERSION=${{ steps.version.outputs.version }} | |
| git tag -a "${VERSION}" -m "Up version to ${VERSION}" | |
| git push origin "${VERSION}" |