Skip to content

update github action #19

update github action

update github action #19

Workflow file for this run

name: Plugin Upgrade
# Trigger manual
on:
push:
branches:
- test/action-plugin-upgrade
jobs:
build:
runs-on: macos-13
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Tools
uses: ./.github/actions/setup-tools
- name: List installed Java versions
run: /usr/libexec/java_home -V
- name: Verify Java version
run: java -version
- name: Run Capacitor Plugin Migration
working-directory: plugin
run: npx @capacitor/plugin-migration-v6-to-v7@latest
- name: Configure Git
run: |
git config user.name "Github Workflow (on behalf of ${{ github.actor }})"
git config user.email "users.noreply.github.com"
git remote set-url origin https://x-access-token:${CAP_GH_RELEASE_TOKEN}@github.com/${{ github.repository }}.git
env:
CAP_GH_RELEASE_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
- name: Create branch for migration
run: |
git branch -D plugin-migration-v7 || true
git push origin --delete plugin-migration-v7 || true
git checkout -b plugin-migration-v7
env:
CAP_GH_RELEASE_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}
- name: Commit plugin changes
run: |
git add .
git diff --cached --quiet || git commit -m "Migrate plugin to Capacitor v7"
- name: Push to branch
run: git push origin plugin-migration-v7
env:
CAP_GH_RELEASE_TOKEN: ${{ secrets.CAP_GH_RELEASE_TOKEN }}