-
Notifications
You must be signed in to change notification settings - Fork 68
45 lines (43 loc) · 1.52 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
name: Create Release
on:
workflow_dispatch:
inputs:
versionName:
description: 'Semantic Version Number (i.e., 5.5.0 or patch, minor, major, prepatch, preminor, premajor, prerelease)'
required: true
default: patch
jobs:
create_release:
runs-on: ubuntu-latest
steps:
- name: Check out code
uses: actions/checkout@v3
with:
ref: main
ssh-key: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_SSH }}
- name: Reset dev branch
run: |
git fetch origin dev:dev
git reset --hard origin/dev
- name: Set up Python 3.8
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: Change version number
id: version
run: |
python -m pip install bump2version
echo -n "next_tag={next_tag}" >> $GITHUB_OUTPUT
bump2version --list ${{ github.event.inputs.versionName }} | grep new_version | sed -r s,"^.*=",,
- name: Create pull request into prod
uses: peter-evans/create-pull-request@v3
with:
branch: release/delphi-epidata-${{ steps.version.outputs.next_tag }}
commit-message: 'chore: release delphi-epidata ${{ steps.version.outputs.next_tag }}'
base: main
title: Release Delphi Epidata ${{ steps.version.outputs.next_tag }}
labels: chore
reviewers: melange396
assignees: melange396
body: |
Releasing Delphi Epidata ${{ steps.version.outputs.next_tag }}.