Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 6 additions & 18 deletions .github/workflows/sync-vue-pivottable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,36 +8,24 @@ on:
jobs:
sync-release:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}

- name: Generate GitHub App Token
id: generate-token
uses: tibdex/github-app-token@v1
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}
installation_id: ${{ secrets.APP_INSTALLATION_ID }}

- name: Sync release branch with main
env:
GITHUB_TOKEN: ${{ steps.generate-token.outputs.token }}
- name: Update or create release branch
run: |
git config --global user.name "GitHub App"
git config --global user.email "github-app@example.com"

git fetch origin

if git ls-remote --exit-code --heads origin release; then
git fetch origin release
git checkout -b release origin/release
git merge --no-edit origin/main
else
git checkout -b release origin/main
git checkout -b release
fi

git push "https://x-access-token:${GITHUB_TOKEN}@github.com/vue-pivottable/vue3-pivottable.git" release
git push origin release