-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Creating a reusable GitHub Actions workflow to set up release branches in Shipwright projects, and a corresponding starter workflow template. These workflows will let Shipwright projects opt into setting up release branches for project artifacts. The workflows allow branches to be created at specific git references, allowing release branches to be set up retroactively. Signed-off-by: Adam Kaplan <[email protected]>
- Loading branch information
1 parent
91f680a
commit fb4cc1c
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"name": "adambkaplan Release Brancher", | ||
"description": "Starter workflow for creating release branches", | ||
"iconName": "octicon git-branch", | ||
"categories": [ | ||
"Automation" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: false | ||
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 }} |