Skip to content

Commit

Permalink
Merge pull request #3 from adambkaplan/release-branch-template
Browse files Browse the repository at this point in the history
SHIP-0038: Release Branch Workflows
  • Loading branch information
SaschaSchwarze0 authored Mar 20, 2024
2 parents 91f680a + 925d166 commit cab20f2
Show file tree
Hide file tree
Showing 3 changed files with 56 additions and 0 deletions.
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 }}

0 comments on commit cab20f2

Please sign in to comment.