Skip to content

Commit 8dfe524

Browse files
committed
Added GitHub Actions for release draft
1 parent 938b661 commit 8dfe524

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Create draft release
2+
3+
on:
4+
repository_dispatch:
5+
types:
6+
- release
7+
workflow_dispatch:
8+
inputs:
9+
version:
10+
description: 'Version of the Ruby package to release'
11+
required: true
12+
default: '3.3.4'
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v4
19+
20+
- uses: ruby/setup-ruby@v1
21+
with:
22+
ruby-version: 3.3.4
23+
24+
- name: Generate draft release entry
25+
run: |
26+
ruby lib/draft-release.rb ${{ github.event.client_payload.version || github.event.inputs.version }}
27+
28+
- name: Create Commit
29+
run: |
30+
git config user.name "GitHub Actions Bot"
31+
git config user.email "github-actions[bot]@users.noreply.github.com"
32+
git add .
33+
git commit -m "Create release for ${{ github.event.client_payload.version || github.event.inputs.version }}"
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }}
36+
37+
- name: Create Pull Request
38+
uses: peter-evans/create-pull-request@v6
39+
with:
40+
token: ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }}
41+
branch: releases/${{ github.event.client_payload.version || github.event.inputs.version }}
42+
delete-branch: true
43+
title: "Create release for ${{ github.event.client_payload.version || github.event.inputs.version }}"
44+
body: "This is an automated pull request to create a release"
45+
draft: true

0 commit comments

Comments
 (0)