-
Notifications
You must be signed in to change notification settings - Fork 10
70 lines (65 loc) · 2.67 KB
/
create-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
60
61
62
63
64
65
66
67
68
69
70
# This is a basic workflow that is manually triggered
name: Create a new MLBench release
# Controls when the action will run. Workflow runs when manually triggered using the UI
# or API.
on:
workflow_dispatch:
# Inputs the workflow accepts.
inputs:
patch:
# Friendly description to be shown in the UI instead of 'name'
description: 'Patch [major].[minor].[patch]-[dev]'
# Input has to be provided for the workflow to run
required: true
futureRelease:
description: 'Future release Number'
required: true
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "greet"
create-release:
# The type of runner that the job will run on
runs-on: ubuntu-latest
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Create release branch
- name: Create Release Branch
uses: peterjgrainger/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
branch: release/v${{ github.event.inputs.futureRelease}}
# Checkout Branch
- name: Checkout release branch
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
ref: release/v${{ github.event.inputs.futureRelease}}
# Bump version
- name: setup python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Bump version
run: pip install bumpversion && bumpversion --allow-dirty --no-tag --no-commit ${{ github.event.inputs.patch }}
# Generate changelog
- name: Find Latest Tag
# You may pin to the exact commit or the version.
# uses: oprypin/find-latest-tag@cc85180adff5be91282940868529accfc5ab40a7
uses: oprypin/[email protected]
with:
repository: mlbench/mlbench-core
id: previousTag
- name: Generate Changelog using github-changelog-generator
# You may pin to the exact commit or the version.
# uses: faberNovel/github-changelog-generator-action@5fcc510347703c66014a0d54c2c6dfb6c1851eaa
uses: faberNovel/[email protected]
with:
options: -u mlbench -p mlbench-core -t ${{ secrets.GITHUB_TOKEN }} \
--release-branch release/v${{ github.event.inputs.futureRelease}} --future-release v${{ github.event.inputs.futureRelease }} \
--since-tag ${{ steps.previousTag.outputs.tag }} --base CHANGELOG.md
- name: Commit Changes
uses: stefanzweifel/[email protected]
with:
commit_message: 'Bump version and update Changelog'