Skip to content

Record your screen, ship a demo. Free and open-source, GPU-accelerated, no watermarks, no subscriptions. Windows, macOS, Linux. Actively maintained.

fix(ci): use GITHUB_TOKEN for tag push to trigger build.yml downstream

EtienneLescotdfcf7dc07d40
diff --git a/.github/workflows/prerelease.yml b/.github/workflows/prerelease.yml
index 97db47e85..fe8fd1b22 100644
--- a/.github/workflows/prerelease.yml
+++ b/.github/workflows/prerelease.yml
@@ -123,13 +123,14 @@ jobs:
- name: Push RC tag
env:
- TOKEN: ${{ secrets.OPENSCREEN_RELEASE_TOKEN }}
+ # Use GITHUB_TOKEN for the tag push: a tag is a ref, not a file change, so
+ # the workflows:write permission isn't needed, and GITHUB_TOKEN pushes do
+ # trigger downstream workflows (build.yml). PAT pushes silently do NOT.
RC_TAG: ${{ steps.version.outputs.rc_tag }}
run: |
set -euo pipefail
# After gh pr merge --rebase, the bump commit is on origin/main. Refresh the
# local main and tag the resulting HEAD so the tag points at the merged commit.
- git remote set-url origin "https://x-access-token:${TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git fetch origin main
git checkout main
git reset --hard origin/main
diff --git a/.github/workflows/promote.yml b/.github/workflows/promote.yml
index d8a22dd5b..507537ffe 100644
--- a/.github/workflows/promote.yml
+++ b/.github/workflows/promote.yml
@@ -106,11 +106,12 @@ jobs:
- name: Push stable tag
env:
- TOKEN: ${{ secrets.OPENSCREEN_RELEASE_TOKEN }}
+ # Use GITHUB_TOKEN for the tag push: a tag is a ref, not a file change, so
+ # the workflows:write permission isn't needed, and GITHUB_TOKEN pushes do
+ # trigger downstream workflows (build.yml). PAT pushes silently do NOT.
STABLE_TAG: ${{ steps.version.outputs.stable_tag }}
run: |
set -euo pipefail
- git remote set-url origin "https://x-access-token:${TOKEN}@github.com/${GITHUB_REPOSITORY}.git"
git fetch origin main
git checkout main
git reset --hard origin/main