Skip to content

Commit 412a47b

Browse files
committed
new commit
1 parent 409503f commit 412a47b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+18533
-18533
lines changed

.github/workflows/create-release.yml

Lines changed: 77 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,77 +1,77 @@
1-
name: Create Release
2-
3-
on:
4-
workflow_dispatch:
5-
inputs:
6-
versionName:
7-
description: 'Semantic Version Number (i.e., 5.5.0 or patch, minor, major)'
8-
required: true
9-
default: patch
10-
11-
jobs:
12-
create_release:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Check out code
16-
uses: actions/checkout@v2
17-
with:
18-
ref: main
19-
ssh-key: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_SSH }}
20-
- name: Reset dev branch
21-
run: |
22-
git fetch origin dev:dev
23-
git reset --hard origin/dev
24-
- name: Set up Python 3.8
25-
uses: actions/setup-python@v2
26-
with:
27-
python-version: 3.8
28-
- name: Change version number
29-
id: version
30-
# See this issue for explanation and testing:
31-
# https://github.com/cmu-delphi/delphi-epidata/pull/1473
32-
run: |
33-
python -m pip install bump2version
34-
if [[ ${{ github.event.inputs.versionName }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
35-
# use given version number
36-
NEXT_TAG="${{ github.event.inputs.versionName }}"
37-
elif [[ ${{ github.event.inputs.versionName }} =~ ^(major|minor|patch)$ ]]; then
38-
# calculate new version number based on given tag
39-
NEXT_TAG=$(bump2version --dry-run --list ${{ github.event.inputs.versionName }} | grep ^new_version | sed -r s,"^.*=",,)
40-
else
41-
echo "\nInvalid version name: ${{ github.event.inputs.versionName }}"
42-
exit 1
43-
fi
44-
# apply given or calculated version number
45-
bump2version --new-version $NEXT_TAG _ignored_arg_
46-
# save version number for later
47-
echo "next_tag=$NEXT_TAG" >> $GITHUB_OUTPUT
48-
- name: Get Python client file changes
49-
id: changed-py
50-
uses: dorny/paths-filter@v3
51-
with:
52-
base: "main"
53-
ref: "dev"
54-
filters: |
55-
python_client_changed:
56-
- src/client/delphi_epidata.py
57-
- src/client/packaging/pypi/**
58-
- name: Bump Python versions if client files changed
59-
if: steps.changed-py.outputs.python_client_changed == 'true'
60-
# _ignored_arg_ below is required because of tool quirk
61-
# https://github.com/c4urself/bump2version/issues/22
62-
run: |
63-
cd src/client/packaging/pypi
64-
# this is using the new literal version number (steps.version.outputs.next_tag) output from the bump2version step above, not the workflow input (github.event.inputs.versionName) which can be relative
65-
bump2version --allow-dirty --new-version ${{ steps.version.outputs.next_tag }} _ignored_arg_
66-
- name: Create pull request into main
67-
uses: peter-evans/create-pull-request@v3
68-
with:
69-
branch: release/delphi-epidata-${{ steps.version.outputs.next_tag }}
70-
commit-message: 'chore: release delphi-epidata ${{ steps.version.outputs.next_tag }}'
71-
base: main
72-
title: Release Delphi Epidata ${{ steps.version.outputs.next_tag }}
73-
labels: chore
74-
reviewers: melange396
75-
assignees: melange396
76-
body: |
77-
Releasing Delphi Epidata ${{ steps.version.outputs.next_tag }}.
1+
name: Create Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
versionName:
7+
description: 'Semantic Version Number (i.e., 5.5.0 or patch, minor, major)'
8+
required: true
9+
default: patch
10+
11+
jobs:
12+
create_release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Check out code
16+
uses: actions/checkout@v2
17+
with:
18+
ref: main
19+
ssh-key: ${{ secrets.CMU_DELPHI_DEPLOY_MACHINE_SSH }}
20+
- name: Reset dev branch
21+
run: |
22+
git fetch origin dev:dev
23+
git reset --hard origin/dev
24+
- name: Set up Python 3.8
25+
uses: actions/setup-python@v2
26+
with:
27+
python-version: 3.8
28+
- name: Change version number
29+
id: version
30+
# See this issue for explanation and testing:
31+
# https://github.com/cmu-delphi/delphi-epidata/pull/1473
32+
run: |
33+
python -m pip install bump2version
34+
if [[ ${{ github.event.inputs.versionName }} =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
35+
# use given version number
36+
NEXT_TAG="${{ github.event.inputs.versionName }}"
37+
elif [[ ${{ github.event.inputs.versionName }} =~ ^(major|minor|patch)$ ]]; then
38+
# calculate new version number based on given tag
39+
NEXT_TAG=$(bump2version --dry-run --list ${{ github.event.inputs.versionName }} | grep ^new_version | sed -r s,"^.*=",,)
40+
else
41+
echo "\nInvalid version name: ${{ github.event.inputs.versionName }}"
42+
exit 1
43+
fi
44+
# apply given or calculated version number
45+
bump2version --new-version $NEXT_TAG _ignored_arg_
46+
# save version number for later
47+
echo "next_tag=$NEXT_TAG" >> $GITHUB_OUTPUT
48+
- name: Get Python client file changes
49+
id: changed-py
50+
uses: dorny/paths-filter@v3
51+
with:
52+
base: "main"
53+
ref: "dev"
54+
filters: |
55+
python_client_changed:
56+
- src/client/delphi_epidata.py
57+
- src/client/packaging/pypi/**
58+
- name: Bump Python versions if client files changed
59+
if: steps.changed-py.outputs.python_client_changed == 'true'
60+
# _ignored_arg_ below is required because of tool quirk
61+
# https://github.com/c4urself/bump2version/issues/22
62+
run: |
63+
cd src/client/packaging/pypi
64+
# this is using the new literal version number (steps.version.outputs.next_tag) output from the bump2version step above, not the workflow input (github.event.inputs.versionName) which can be relative
65+
bump2version --allow-dirty --new-version ${{ steps.version.outputs.next_tag }} _ignored_arg_
66+
- name: Create pull request into main
67+
uses: peter-evans/create-pull-request@v3
68+
with:
69+
branch: release/delphi-epidata-${{ steps.version.outputs.next_tag }}
70+
commit-message: 'chore: release delphi-epidata ${{ steps.version.outputs.next_tag }}'
71+
base: main
72+
title: Release Delphi Epidata ${{ steps.version.outputs.next_tag }}
73+
labels: chore
74+
reviewers: melange396
75+
assignees: melange396
76+
body: |
77+
Releasing Delphi Epidata ${{ steps.version.outputs.next_tag }}.

0 commit comments

Comments
 (0)