diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml new file mode 100644 index 0000000..a4960d8 --- /dev/null +++ b/.github/workflows/bump-version.yml @@ -0,0 +1,40 @@ +name: Bump Version + +on: + workflow_dispatch: + inputs: + bump_type: + description: "Version bump type" + required: true + default: patch + type: choice + options: + - patch + - minor + - major + +permissions: + contents: write + +jobs: + bump-version: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + + - name: Use Node.js 20.x + uses: actions/setup-node@v2 + with: + node-version: 20.x + + - name: Configure Git user + run: | + git config user.name "github-actions[bot]" + git config user.email "github-actions[bot]@users.noreply.github.com" + + - name: Bump version + run: npm version ${{ github.event.inputs.bump_type }} -m "chore(release): %s" + + - name: Push commit and tag + run: git push origin HEAD --follow-tags