Skip to content

Commit ed16f96

Browse files
committed
GHA: Auto publish dev build on main
Also perform hatch download before gitlint install in test-release workflow. This buys us a little more time for the package to show up on PyPI before trying to install and test it.
1 parent ccbb5e9 commit ed16f96

File tree

2 files changed

+15
-3
lines changed

2 files changed

+15
-3
lines changed

.github/workflows/checks.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,13 @@ jobs:
118118
uses: re-actors/alls-green@release/v1
119119
with:
120120
jobs: ${{ toJSON(needs) }}
121+
122+
# When on main, auto publish dev build
123+
auto_publish_dev:
124+
needs:
125+
- checks
126+
if: github.ref == 'refs/heads/main'
127+
uses: ./.github/workflows/publish-release.yml
128+
with:
129+
pypi_target: "test.pypi.org"
130+
repo_release_ref: "main"

.github/workflows/test-release.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,11 @@ jobs:
4848
with:
4949
python-version: ${{ matrix.python-version }}
5050

51+
# Intentionally install hatch before gitlint, to buy us a few extra seconds in case the gitlint package was just
52+
# published and hasn't appeared on PyPI yet.
53+
- name: Install Hatch
54+
run: python -m pip install hatch==1.6.3
55+
5156
- name: Install gitlint
5257
run: |
5358
python -m pip install gitlint==${{ inputs.gitlint_version }}
@@ -67,9 +72,6 @@ jobs:
6772
with:
6873
ref: ${{ inputs.repo_test_ref }}
6974

70-
- name: Install Hatch
71-
run: python -m pip install hatch==1.6.3
72-
7375
- name: Integration tests (default -> GITLINT_USE_SH_LIB=1)
7476
run: |
7577
hatch run qa:integration-tests

0 commit comments

Comments
 (0)