diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml new file mode 100644 index 0000000..76ef740 --- /dev/null +++ b/.github/workflows/bump-version.yml @@ -0,0 +1,28 @@ +name: Bump version workflow + +on: + push: + branches: + - main + +jobs: + bump-version: + name: Bump package version + if: "!contains(github.event.head_commit.message, 'Bump version')" + runs-on: ubuntu-20.04 + steps: + - name: actions/checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + - name: current_version + run: echo "current_version=$(grep '# version' version.md | cut -d ' ' -f3)" >> $GITHUB_ENV + - name: FragileTech/bump-version + uses: FragileTech/bump-version@main + with: + current_version: "${{ env.current_version }}" + files: version.md + commit_name: Your Company Bot + commit_email: bot@your-company.com + login: your-bot-login + token: "${{ secrets.BOT_TOKEN }}"