Skip to content

Commit 718cbb4

Browse files
committed
Adding git user config and splitting out candidate to separate job
1 parent 2066817 commit 718cbb4

File tree

2 files changed

+28
-8
lines changed

2 files changed

+28
-8
lines changed

.github/workflows/docs.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -70,14 +70,25 @@ jobs:
7070
with:
7171
password: ${{ inputs.test_pypi && secrets.TEST_PYPI_API_TOKEN || secrets.PYPI_API_TOKEN }}
7272
repository-url: ${{ inputs.test_pypi && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/' }}
73-
73+
74+
bump-candidate:
75+
if: ${{ inputs.candidate }}
76+
runs-on: ubuntu-latest
77+
steps:
78+
- uses: actions/checkout@v4
79+
with:
80+
ref: 'main-clone'
81+
82+
- name: Configure Git user
83+
run: |
84+
git config user.name "github-actions[bot]"
85+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
86+
7487
- name: Bump to next candidate
75-
if: ${{ inputs.candidate && !inputs.test_pypi }}
7688
run: |
7789
make bumpversion-candidate
7890
7991
- name: Get last commit message
80-
if: ${{ inputs.candidate && !inputs.test_pypi }}
8192
id: get_message
8293
run: |
8394
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
@@ -86,7 +97,6 @@ jobs:
8697
echo "EOF" >> $GITHUB_ENV
8798
8899
- name: Create PR for candidate
89-
if: ${{ inputs.candidate && !inputs.test_pypi }}
90100
id: bump-candidate-pr
91101
uses: peter-evans/create-pull-request@v4
92102
with:

.github/workflows/release.yml

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,14 +43,25 @@ jobs:
4343
with:
4444
password: ${{ inputs.test_pypi && secrets.TEST_PYPI_API_TOKEN || secrets.PYPI_API_TOKEN }}
4545
repository-url: ${{ inputs.test_pypi && 'https://test.pypi.org/legacy/' || 'https://upload.pypi.org/legacy/' }}
46-
46+
47+
bump-candidate:
48+
if: ${{ inputs.candidate }}
49+
runs-on: ubuntu-latest
50+
steps:
51+
- uses: actions/checkout@v4
52+
with:
53+
ref: 'main-clone'
54+
55+
- name: Configure Git user
56+
run: |
57+
git config user.name "github-actions[bot]"
58+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
59+
4760
- name: Bump to next candidate
48-
if: ${{ inputs.candidate && !inputs.test_pypi }}
4961
run: |
5062
make bumpversion-candidate
5163
5264
- name: Get last commit message
53-
if: ${{ inputs.candidate && !inputs.test_pypi }}
5465
id: get_message
5566
run: |
5667
COMMIT_MESSAGE=$(git log -1 --pretty=%B)
@@ -59,7 +70,6 @@ jobs:
5970
echo "EOF" >> $GITHUB_ENV
6071
6172
- name: Create PR for candidate
62-
if: ${{ inputs.candidate && !inputs.test_pypi }}
6373
id: bump-candidate-pr
6474
uses: peter-evans/create-pull-request@v4
6575
with:

0 commit comments

Comments
 (0)