Skip to content

Commit a7e566f

Browse files
committed
feat: add release workflow
1 parent 5ec7ec7 commit a7e566f

File tree

3 files changed

+50
-0
lines changed

3 files changed

+50
-0
lines changed

.bumpversion.cfg

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[bumpversion]
2+
current_version = 0.1.0
3+
commit = False
4+
tag = False
5+
6+
[bumpversion:file:src/server/_config.py]
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Create Delphi Epidata Release
2+
on:
3+
workflow_dispatch:
4+
inputs:
5+
versionName:
6+
description: 'Semantic Version Number (i.e., 5.5.0 or patch, minor, major, prepatch, preminor, premajor, prerelease)'
7+
required: true
8+
default: patch
9+
jobs:
10+
create_release:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check out code
14+
uses: actions/checkout@v2
15+
with:
16+
ref: main
17+
ssh-key: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_SSH }}
18+
- name: Reset dev branch
19+
run: |
20+
git fetch origin dev:dev
21+
git reset --hard main
22+
- name: Set up Python 3.8
23+
uses: actions/setup-python@v2
24+
with:
25+
python-version: 3.8
26+
- name: Change version number
27+
id: version
28+
run: |
29+
python -m pip install bump2version
30+
echo -n "::set-output name=next_tag::"
31+
bump2version --list ${{ github.event.inputs.versionName }} | grep new_version | sed -r s,"^.*=",,
32+
- name: Create pull request into prod
33+
uses: peter-evans/create-pull-request@v3
34+
with:
35+
branch: release/delphi-epidata-${{ steps.version.outputs.next_tag }}
36+
commit-message: 'chore: release delphi-epidata ${{ steps.version.outputs.next_tag }}'
37+
base: main
38+
title: Release Delphi Epidata ${{ steps.version.outputs.next_tag }}
39+
labels: chore
40+
reviewers: krivard
41+
assignees: krivard
42+
body: |
43+
Releasing Delphi Epidata ${{ steps.version.outputs.next_tag }}.

requirements.dev.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@ black>=20.8b1
33
sqlalchemy-stubs>=0.3
44
mypy>=0.790
55
pytest
6+
bump2version

0 commit comments

Comments
 (0)