Skip to content

Create Release

Create Release #74

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 }}.