Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SHIP-0038: Release Branch Workflows #3

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 25 additions & 0 deletions .github/workflows/release-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Reusable release brancher workflow
# See SHIP-0038: https://github.com/shipwright-io/community/pull/194
name: Release Brancher
on:
workflow_call:
inputs:
release-version:
required: true
type: string
git-ref:
required: false
type: string
jobs:
release-brancher:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.git-ref }}
- name: Create release branch
env:
RELEASE_VERSION: release-${{ inputs.release-version }}
run: |
git switch -c "${RELEASE_VERSION}"
git push --set-upstream origin "${RELEASE_VERSION}"
8 changes: 8 additions & 0 deletions workflow-templates/release-branch.properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": "Release Brancher",
"description": "Starter workflow for creating release branches",
"iconName": "octicon git-branch",
"categories": [
"Automation"
]
}
23 changes: 23 additions & 0 deletions workflow-templates/release-branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Release branch starter workflow
# See SHIP-0038: https://github.com/shipwright-io/community/pull/194
name: Create Release Branch
on:
workflow_dispatch:
inputs:
release-version:
required: true
type: string
description: "Semantic version for the release branch (vX.Y format)"
git-ref:
required: true
type: string
description: "Git ref to create the release branch from (defaults to main)"
default: "main"
jobs:
create-release-branch:
permissions:
contents: write
uses: shipwright-io/.github/.github/workflows/release-branch.yml@main
with:
release-version: ${{ inputs.release-version }}
git-ref: ${{ inputs.git-ref }}