Skip to content

Merge branch 'main' of github.com:Cap-go/capacitor-updater #1156

Merge branch 'main' of github.com:Cap-go/capacitor-updater

Merge branch 'main' of github.com:Cap-go/capacitor-updater #1156

Workflow file for this run

name: Bump version
on:
push:
branches:
- main
- development
jobs:
bump-version:
if: ${{ !startsWith(github.event.head_commit.message, 'chore(release):') }}
runs-on: ubuntu-latest
name: "Bump version and create changelog with standard version"
steps:
- name: Check out
uses: actions/checkout@v4
with:
fetch-depth: 0
token: '${{ secrets.PERSONAL_ACCESS_TOKEN }}'
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
id: install_code
run: pnpm install --frozen-lockfile
- 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: pnpm docgen
- name: Update Doc
run: pnpm docgen:api
- name: Add doc to github
run: |
git add README.md
git add api.md
git commit --m "docs: update doc" || true
- name: Create bump and changelog main
if: github.ref == 'refs/heads/main'
run: pnpm dlx capacitor-plugin-standard-version@latest
- name: Create bump and changelog development
if: github.ref != 'refs/heads/main'
run: pnpm dlx capacitor-plugin-standard-version@latest --prerelease alpha
- 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
- name: Push generated doc to doc repo
uses: nkoppel/push-files-to-another-repository@v1.1.2
env:
API_TOKEN_GITHUB: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
with:
source-files: api.md
destination-username: Cap-go
destination-repository: website
destination-directory: src/content/docs/docs/plugin
destination-branch: main
commit-email: martindonadieu@gmail.com
create-cache:
if: ${{ !startsWith(github.event.head_commit.message, 'chore(release):') }}
runs-on: ubuntu-latest
name: "Create global cache on main branch"
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v3
with:
version: 8
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: 'pnpm'
- name: Install dependencies
id: install_code
run: pnpm install --frozen-lockfile
- name: CLI capacitor-standard-version install
run: pnpm dlx capacitor-standard-version@latest --version