-
Notifications
You must be signed in to change notification settings - Fork 12
53 lines (46 loc) · 1.51 KB
/
release.yml
File metadata and controls
53 lines (46 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# GitHub Releasing Workflow
name: GitHub - Release
on:
workflow_dispatch:
inputs:
bump:
type: choice
description: "The type of version bump to perform"
options:
- patch
- minor
- major
permissions:
contents: write
jobs:
release-next:
runs-on: ubuntu-latest
steps:
- name: "Checkout"
uses: actions/checkout@v6
- name: "Patch Release Me"
uses: 42ByteLabs/patch-release-me@ef44b04c04fde87280adf14548664bfbcebba04d # 0.6.4
with:
mode: ${{ github.event.inputs.bump }}
- name: "Bundle"
run: |
set -e
cd .github/action
npm i && npm run bundle
- name: "Get Version"
id: get_version
run: |
set -e
pip install yq
echo "version=$(cat .release.yml | yq -r ".version")" >> "$GITHUB_ENV"
echo "release=true" >> "$GITHUB_ENV"
- name: "Create Release"
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
with:
token: ${{ github.token }}
commit-message: "[chore]: Create release for ${{ steps.get_version.outcome.version }}"
title: "[chore]: Create release for ${{ steps.get_version.outcome.version }}"
branch: chore-release-${{ steps.get_version.outcome.version }}
labels: version
body: |
This is an automated PR to create a new release. The release will be created once this PR is merged.