mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-07 10:56:41 +08:00
Backport of #37531 to release/2026.1. --- - Only run on discourse/discourse. Not on forks - Stop auto-creating version-bump PRs for release branches. We'll use workflow-dispatch. Co-authored-by: David Taylor <david@taylorhq.com>
49 lines
1.3 KiB
YAML
49 lines
1.3 KiB
YAML
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 }}]
|