n8n/.github/workflows/ensure-release-candidate-branch.yml

53 lines
1.3 KiB
YAML

name: Ensure release-candidate branch
on:
workflow_dispatch:
inputs:
version:
description: 'Latest release version (e.g. 2.8.1 or n8n@2.8.1)'
required: true
type: string
workflow_call:
inputs:
version:
description: 'Latest release version (e.g. 2.8.1 or n8n@2.8.1)'
required: true
type: string
outputs:
branch:
description: 'release-candidate branch name (e.g. release-candidate/2.8.x)'
value: ${{ jobs.ensure.outputs.branch }}
jobs:
ensure:
runs-on: ubuntu-slim
permissions:
contents: write
outputs:
branch: ${{ steps.rc.outputs.branch }}
steps:
- name: Checkout
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0
fetch-tags: true
- name: Setup NodeJS
uses: ./.github/actions/setup-nodejs
with:
install-command: npm install --prefix=.github/scripts --no-package-lock
build-command: ''
- name: Ensure release-candidate branch exists
id: rc
env:
VERSION: ${{ inputs.version }}
run: node ./.github/scripts/create-release-candidate-branch.mjs
- name: Print branch
run: |
echo "Release-candidate branch: ${{ steps.rc.outputs.branch }}"