discourse/.github/workflows/release-handler.yml
David Taylor 1284bbf4b0
DEV: Update release automation workflows (#37531)
- Only run on discourse/discourse. Not on forks
- Stop auto-creating version-bump PRs for release branches. We'll use
workflow-dispatch.
2026-02-04 15:21:01 +00:00

49 lines
1.3 KiB
YAML
Vendored

name: Release - create tags & branches
on:
workflow_dispatch:
inputs:
sha:
description: "The commit SHA to prepare the release for"
required: false
type: string
push:
branches:
- main
paths:
- "lib/version.rb"
permissions:
contents: write
pull-requests: write
actions: write
jobs:
build:
name: run
runs-on: ubuntu-latest
if: github.repository == 'discourse/discourse'
container: discourse/discourse_test:slim
timeout-minutes: 10
steps:
- uses: actions/checkout@v6
with:
filter: tree:0
fetch-depth: 0
- uses: ./.github/actions/setup-release-environment
- name: Maybe cut branch
id: maybe-cut-branch
if: github.ref == 'refs/heads/main'
run: bin/rake release:maybe_cut_branch[${{ inputs.sha || github.sha }}]
- name: Maybe trigger prepare next version
if: steps.maybe-cut-branch.outputs.new_branch_name
run: gh workflow run release-branch-handler.yml -f branch="${{ steps.maybe-cut-branch.outputs.new_branch_name }}"
env:
GH_TOKEN: ${{ github.token }}
- name: Maybe tag release
run: bin/rake release:maybe_tag_release[${{ inputs.sha || github.sha }}]