From 9e8248aff1c28d468c461fad5549cc7e384e2278 Mon Sep 17 00:00:00 2001 From: rlauuzo <46294892+rlauuzo@users.noreply.github.com> Date: Fri, 17 Jul 2026 08:51:41 +0000 Subject: [PATCH] ci: make 12.0 release workflow dispatch-driven with its own version series Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --- .github/workflows/release.yml | 32 ++++++++++++-------------------- Directory.Build.props | 6 +++--- 2 files changed, 15 insertions(+), 23 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index b5cc193..42ac815 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,11 +1,9 @@ name: "Release Plugin" +# Releases on this branch are driven by the master branch's release workflow, +# which dispatches this workflow on ref 12.0 after every upstream check +# (schedule and repository_dispatch events only ever run on the default branch). on: - schedule: - - cron: "*/30 * * * *" - repository_dispatch: - types: - - segment-editor-master-updated workflow_dispatch: inputs: prerelease: @@ -26,7 +24,7 @@ jobs: release: runs-on: ubuntu-latest concurrency: - group: release-plugin + group: release-plugin-12.0 cancel-in-progress: false steps: @@ -54,13 +52,11 @@ jobs: fi SHOULD_RELEASE="false" - if [ "${{ github.event_name }}" != "schedule" ]; then - SHOULD_RELEASE="true" - elif [ "$UPSTREAM_SHA" != "$LAST_SHA" ]; then + if [ "$UPSTREAM_SHA" != "$LAST_SHA" ]; then SHOULD_RELEASE="true" fi - if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.force_release }}" = "true" ]; then + if [ "${{ inputs.force_release }}" = "true" ]; then SHOULD_RELEASE="true" fi @@ -223,7 +219,7 @@ jobs: echo "No changes to commit." else git -c user.name="github-actions[bot]" -c user.email="github-actions[bot]@users.noreply.github.com" commit -m "chore: release ${{ env.RELEASE_TAG }}" - git push origin HEAD:${{ github.event.repository.default_branch }} + git push origin HEAD:${{ github.ref_name }} fi - name: Publish release @@ -232,19 +228,15 @@ jobs: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} shell: bash run: | - PRERELEASE="false" - if [ "${{ github.event_name }}" = "workflow_dispatch" ] && [ "${{ inputs.prerelease }}" = "true" ]; then - PRERELEASE="true" - fi - - if [ "$PRERELEASE" = "true" ]; then + PRERELEASE_FLAG="" + if [ "${{ inputs.prerelease }}" = "true" ]; then PRERELEASE_FLAG="--prerelease" - else - PRERELEASE_FLAG="" fi + TARGET_SHA=$(git rev-parse HEAD) + if gh release view "${{ env.RELEASE_TAG }}" >/dev/null 2>&1; then gh release upload "${{ env.RELEASE_TAG }}" "segment-editor-plugin-${{ env.RELEASE_TAG }}.zip" --clobber else - gh release create "${{ env.RELEASE_TAG }}" "segment-editor-plugin-${{ env.RELEASE_TAG }}.zip" --title "${{ env.RELEASE_TAG }}" --generate-notes --target "${{ github.event.repository.default_branch }}" ${PRERELEASE_FLAG} + gh release create "${{ env.RELEASE_TAG }}" "segment-editor-plugin-${{ env.RELEASE_TAG }}.zip" --title "${{ env.RELEASE_TAG }}" --generate-notes --target "$TARGET_SHA" ${PRERELEASE_FLAG} fi diff --git a/Directory.Build.props b/Directory.Build.props index 2a18094..c6b5da2 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,7 +1,7 @@ - 1.0.55.0 - 1.0.55.0 - 1.0.55.0 + 12.0.0.0 + 12.0.0.0 + 12.0.0.0