forked from praw-dev/praw
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (46 loc) · 1.58 KB
/
Copy pathprepare_release.yml
File metadata and controls
47 lines (46 loc) · 1.58 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
jobs:
prepare_release:
name: Prepare Release v${{ github.event.inputs.version }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ssh-key: ${{ secrets.SSH_DEPLOY_KEY }}
- uses: actions/setup-python@v2
with:
python-version: 3.x
- name: Install dependencies
run: pip install packaging
- name: Prepare Git Variables
run: |
git config --global author.email ${{ github.actor }}@users.noreply.github.com
git config --global author.name ${{ github.actor }}
git config --global committer.email noreply@github.com
git config --global committer.name GitHub
- name: Set desired version
run: |
tools/set_version.py ${{ github.event.inputs.version }} > tmp_version
echo "version=$(cat tmp_version)" >> $GITHUB_ENV
- name: Commit desired version
run: git commit -am "Bump to v${{ env.version }}"
- name: Set development version
run: |
tools/set_version.py Unreleased > tmp_version
echo "dev_version=$(cat tmp_version)" >> $GITHUB_ENV
rm tmp_version
- name: Commit development version
run: git commit -am "Set development version v${{ env.dev_version }}"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v3
with:
body:
branch: prepare_release_v${{ env.version }}
draft: false
title: Release v${{ env.version }}
name: Prepare Release
on:
workflow_dispatch:
inputs:
version:
description: 'The version to prepare for release'
required: true