-
Notifications
You must be signed in to change notification settings - Fork 7
37 lines (34 loc) · 1 KB
/
publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Pypi Publish
on:
release:
types:
- created
env:
HATCH_INDEX_AUTH: ${{ secrets.HATCH_INDEX_AUTH }}
HATCH_INDEX_USER: ${{ secrets.HATCH_INDEX_USER }}
jobs:
publish:
name: Pypi Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Extract Release Name
run: echo "RELEASE_NAME=$(echo $GITHUB_REF | sed -n 's/refs\/tags\///p')" >> $GITHUB_ENV
- name: Install hatch
run: pip install hatch
- name: Publish to Pypi
run: |
hatch version $RELEASE_NAME
hatch build
hatch publish -r test -n
- name: Commit new version
run: |
git checkout -b origin/main
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add src/flask_much/__init__.py
git commit -m "Update version number to $RELEASE_NAME."
git push