From 3a77c29278ae80936b4cb030fefc7d21c96c786f Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Sat, 6 Jul 2024 11:54:00 +0200 Subject: [PATCH] Fix updating the v1 branch on automated releases * Fixes https://github.com/ruby/setup-ruby/issues/618 --- .github/workflows/release.yml | 4 ++++ .github/workflows/update-v1-branch.yml | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5c9cbe6c6..a74a6a3df 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -18,3 +18,7 @@ jobs: with: ruby-version: '3.3' - run: ruby release.rb + # The same as the update-v1-branch.yml workflow. + # That workflow is not triggered by the release created above because of + # https://docs.github.com/en/actions/security-guides/automatic-token-authentication#using-the-github_token-in-a-workflow + - run: git push origin HEAD:v1 diff --git a/.github/workflows/update-v1-branch.yml b/.github/workflows/update-v1-branch.yml index f497b7209..6382676df 100644 --- a/.github/workflows/update-v1-branch.yml +++ b/.github/workflows/update-v1-branch.yml @@ -1,4 +1,4 @@ -name: Update the v1 branch when a release is published +name: Update the v1 branch when a release is published manually on: release: types: [published]