Skip to content

Pypi Publish

Pypi Publish #10

Workflow file for this run

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_muck/__init__.py
git commit -m "Update version number to $RELEASE_NAME."
git push --set-upstream origin origin/main