-
Notifications
You must be signed in to change notification settings - Fork 65
66 lines (59 loc) · 2.32 KB
/
release.yml
File metadata and controls
66 lines (59 loc) · 2.32 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
54
55
56
57
58
59
60
61
62
63
64
65
66
name: Create Release Branch
on:
workflow_dispatch:
inputs:
versionName:
description: 'Name of version (ie 2.12)'
required: true
jobs:
createrelease:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 0
ref: 'development'
- name: Create release branch off the development branch
run: |
git checkout -b release/v${{ github.event.inputs.versionName }}
- name: Initialize mandatory git config
run: |
git config user.name "GitHub Actions"
git config user.email noreply@github.com
- name: Merge the master branch into the release branch
run: git rebase origin/master
- name: Change version number and name
run: printf '__version__ = "${{ github.event.inputs.versionName }}"\n' > underworld/_version.py
- name: Commit New _version.py file
id: make-commit
run: |
git add underworld/_version.py
git commit --message "Prepare release ${{ github.event.inputs.versionName }}"
echo "::set-output name=commit::$(git rev-parse HEAD)"
- name: Push new branch
run: git push origin release/v${{ github.event.inputs.versionName }}
- name: Create pull request into master
uses: thomaseizinger/create-pull-request@1.2.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
head: release/v${{ github.event.inputs.versionName }}
base: master
title: v${{ github.event.inputs.versionName }} into main
reviewers: ${{ github.event.issue.user.login }}
body: |
Hi!
This PR was created in response workflow running.
I've updated the version name and code commit: ${{ steps.make-commit.outputs.commit }}.
- name: Create pull request to develop
uses: thomaseizinger/create-pull-request@1.0.0
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
head: release/v${{ github.event.inputs.versionName }}
base: development
title: v${{ github.event.inputs.versionName }} into develop
reviewers: ${{ github.event.issue.user.login }}
body: |
Hi!
This PR was created in response workflow running.
I've updated the version name and code commit: ${{ steps.make-commit.outputs.commit }}.