Skip to content

chore(release): 7.1.2 #7

chore(release): 7.1.2

chore(release): 7.1.2 #7

Workflow file for this run

name: Bump version
on:
push:
branches:
- main
- development
paths-ignore:
- 'example-app/**'
- '.github/**'
jobs:
# Run all tests first before creating any tags
test:
if: ${{ !startsWith(github.event.head_commit.message, 'chore(release):') }}
uses: ./.github/workflows/test.yml
# Only bump version and create tag if all tests pass
bump-version:
needs: [test]
if: ${{ !startsWith(github.event.head_commit.message, 'chore(release):') }}
runs-on: ubuntu-latest
name: "Bump version and create tag"
steps:
- name: Check out
uses: actions/checkout@v6
with:
fetch-depth: 0
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}'
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
id: install_code
run: bun i
- name: Git config
run: |
git config --local user.name "github-actions[bot]"
git config --local user.email "github-actions[bot]@users.noreply.github.com"
- name: Update Doc
run: bun run docgen
- name: Add doc to github
run: |
git add README.md
git commit --m "docs: update doc" || true
- name: Create version bump main
if: github.ref == 'refs/heads/main'
run: bunx capacitor-plugin-standard-version@latest --skip.changelog
- name: Create version bump development
if: github.ref != 'refs/heads/main'
run: bunx capacitor-plugin-standard-version@latest --prerelease alpha --skip.changelog
- name: Push to origin
run: |
CURRENT_BRANCH=$(git rev-parse --abbrev-ref HEAD)
remote_repo="https://${GITHUB_ACTOR}:${{ secrets.PERSONAL_ACCESS_TOKEN }}@github.com/${GITHUB_REPOSITORY}.git"
git pull $remote_repo $CURRENT_BRANCH
git push $remote_repo HEAD:$CURRENT_BRANCH --follow-tags --tags