Skip to content

Commit 0516cdf

Browse files
Stop using the checkout action
1 parent 37b53ef commit 0516cdf

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

.github/workflows/publish.yml

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,7 @@ jobs:
2323
GH_TOKEN: ${{ github.token }}
2424
SSH_AUTH_SOCK: /tmp/ssh_agent.sock
2525
steps:
26-
- name: git clone develop
27-
uses: actions/checkout@v4
28-
with:
29-
ref: develop
30-
31-
- name: Set up Python
26+
- name: set up Python
3227
uses: actions/setup-python@v4
3328
with:
3429
python-version: "3.12"
@@ -38,9 +33,6 @@ jobs:
3833
pip install --upgrade pip
3934
pip install build twine hatch
4035
41-
- name: upgrade version with hatch
42-
run: hatch version ${{ env.VERSION }}
43-
4436
- name: configure git with the bot credentials
4537
run: |
4638
mkdir -p ~/.ssh
@@ -51,13 +43,20 @@ jobs:
5143
git config --global user.name "nextmv-bot"
5244
git config --global user.email "tech+gh-nextmv-bot@nextmv.io"
5345
46+
git clone git@github.com:nextmv-io/nextmv-py.git
47+
48+
- name: upgrade version with hatch
49+
run: hatch version ${{ env.VERSION }}
50+
working-directory: ./nextmv-py
51+
5452
- name: commit new version
5553
run: |
5654
git add nextmv/__about__.py
5755
git commit -m "Bump version to $VERSION"
5856
git push
5957
git tag $VERSION
6058
git push origin $VERSION
59+
working-directory: ./nextmv-py
6160

6261
- name: create release
6362
run: |
@@ -66,26 +65,29 @@ jobs:
6665
PRERELEASE_FLAG="--prerelease"
6766
fi
6867
69-
gh release create -R nextmv-io/nextmv-py $VERSION \
68+
gh release create $VERSION \
7069
--verify-tag \
7170
--generate-notes \
7271
--title $VERSION $PRERELEASE_FLAG
72+
working-directory: ./nextmv-py
7373

7474
- name: build binary wheel and source tarball
7575
env:
7676
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
7777
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
78-
run: |
79-
python -m build
78+
run: python -m build
79+
working-directory: ./nextmv-py
8080

8181
- name: publish to TestPyPI
8282
env:
8383
TWINE_USERNAME: ${{ secrets.TESTPYPI_USERNAME }}
8484
TWINE_PASSWORD: ${{ secrets.TESTPYPI_PASSWORD }}
8585
run: twine upload --repository testpypi dist/*
86+
working-directory: ./nextmv-py
8687

8788
- name: publish to PyPI
8889
env:
8990
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }}
9091
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }}
9192
run: twine upload dist/*
93+
working-directory: ./nextmv-py

0 commit comments

Comments
 (0)