-
Notifications
You must be signed in to change notification settings - Fork 614
59 lines (50 loc) · 1.79 KB
/
draft-release.yml
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
54
55
56
57
58
59
name: Create draft release
on:
repository_dispatch:
types:
- release
workflow_dispatch:
inputs:
version:
description: 'Version of the Ruby package to release'
required: true
default: '3.3.4'
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: www
- uses: actions/checkout@v4
with:
repository: ruby/ruby
path: ruby
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.4
- name: Generate draft release entry
run: |
ruby lib/draft-release.rb ${{ github.event.client_payload.version || github.event.inputs.version }}
- name: Update data files
run: |
tool/format-release ../www ${{ github.event.client_payload.version || github.event.inputs.version }} .
working-directory: ruby
- name: Create Commit
run: |
git config user.name "GitHub Actions Bot"
git config user.email "github-actions[bot]@users.noreply.github.com"
git add .
git commit -m "Create release for ${{ github.event.client_payload.version || github.event.inputs.version }}"
env:
GITHUB_TOKEN: ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }}
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
token: ${{ secrets.MATZBOT_GITHUB_WORKFLOW_TOKEN }}
branch: releases/${{ github.event.client_payload.version || github.event.inputs.version }}
delete-branch: true
title: "Create release for ${{ github.event.client_payload.version || github.event.inputs.version }}"
body: "This is an automated pull request to create a release"
draft: true
working-directory: www