Skip to content

feat: add YouTube (Google Takeout) adapter #23

feat: add YouTube (Google Takeout) adapter

feat: add YouTube (Google Takeout) adapter #23

name: Release Please
on:
push:
branches: [main]
workflow_dispatch:
permissions:
actions: write
contents: write
pull-requests: write
concurrency:
group: release-${{ github.ref }}
cancel-in-progress: false
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- id: release
uses: googleapis/release-please-action@v5
with:
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
- if: ${{ steps.release.outputs.pr }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
WORKFLOW: ${{ github.workflow }}
PR_JSON: ${{ steps.release.outputs.pr }}
run: |
PR=$(echo "$PR_JSON" | jq -r .number)
BRANCH=$(echo "$PR_JSON" | jq -r .headBranchName)
# Rebase-merge works when main has advanced past the release branch's
# base. When the release commit already sits directly on main HEAD,
# GitHub refuses ("This branch can't be rebased") on a rebase-only
# repo — fast-forward main to the release commit via the API instead.
gh pr merge --rebase --auto -R "$REPO" "$PR" \
|| gh pr merge --rebase -R "$REPO" "$PR" \
|| gh api -X PATCH "repos/$REPO/git/refs/heads/main" \
-f sha="$(gh api "repos/$REPO/git/refs/heads/$BRANCH" --jq .object.sha)"
for _ in $(seq 1 30); do
STATE=$(gh pr view "$PR" -R "$REPO" --json state --jq .state)
[ "$STATE" = "MERGED" ] && break
sleep 2
done
gh api -X DELETE "repos/$REPO/git/refs/heads/$BRANCH" 2>/dev/null || true
gh workflow run "$WORKFLOW" -R "$REPO" --ref main
# When a release is actually published, redeploy from main so the live
# build carries the bumped version. release-please's own version-bump
# commit is pushed by GITHUB_TOKEN and does NOT trigger the on:push deploy,
# so the site would otherwise stay one release behind.
- if: ${{ steps.release.outputs.release_created }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
run: gh workflow run deploy.yml -R "$REPO" --ref main