Skip to content

Commit 9408291

Browse files
committed
feat(ci): Add Release Workflow
1 parent 57042e1 commit 9408291

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# GitHub Releasing Workflow
2+
name: GitHub - Release
3+
4+
on:
5+
workflow_dispatch:
6+
inputs:
7+
bump:
8+
type: choice
9+
description: "The type of version bump to perform"
10+
options:
11+
- patch
12+
- minor
13+
- major
14+
15+
16+
permissions:
17+
contents: write
18+
19+
jobs:
20+
release-next:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: "Checkout"
24+
uses: actions/checkout@v4
25+
26+
- name: "Patch Release Me"
27+
uses: 42ByteLabs/patch-release-me@0.3.0
28+
with:
29+
mode: ${{ github.event.inputs.bump }}
30+
31+
- name: "Get Version"
32+
id: get_version
33+
run: |
34+
set -e
35+
pip install yq
36+
echo "version=$(cat .release.yml | yq -r ".version")" >> "$GITHUB_ENV"
37+
echo "release=true" >> "$GITHUB_ENV"
38+
39+
- name: "Create Release"
40+
uses: peter-evans/create-pull-request@v6
41+
with:
42+
token: ${{ github.token }}
43+
commit-message: "[chore]: Create release for ${{ steps.get_version.outcome.version }}"
44+
title: "[chore]: Create release for ${{ steps.get_version.outcome.version }}"
45+
branch: chore-release-${{ steps.get_version.outcome.version }}
46+
labels: version
47+
body: |
48+
This is an automated PR to create a new release. The release will be created once this PR is merged.

0 commit comments

Comments
 (0)