pypi-release

This commit is contained in:
Waylon Walker 2023-01-03 20:47:54 -06:00
parent 00a57bc786
commit edd690c0b0
No known key found for this signature in database
GPG key ID: 66E2BF2B4190EFE4

View file

@ -4,6 +4,9 @@ on:
push:
branches:
- '*'
env:
HATCH_INDEX_USER: __token__
HATCH_INDEX_AUTH: ${{ secrets.pypi_password }}
jobs:
release:
strategy:
@ -62,23 +65,26 @@ jobs:
build_dir: site/markout
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# - name: Upload Release Asset
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: site/markout/creeper-linux-latest.zip
# asset_name: creeper-linux-latest.zip
# asset_content_type: application/zip
# - name: Upload Release Asset
# id: upload-release-asset
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: site/markout/creeper-windows-latest.zip
# asset_name: creeper-windows-latest.zip
# asset_content_type: application/zip
pypi-release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: '3.10'
- name: install hatch
run: pip install hatch
- name: bump version
run: |
git config --global user.name 'autobump'
git config --global user.email 'autobump@users.noreply.github.com'
hatch version major
git add .
git commit -m "Bump version: `hatch version`"
git tag v$NEW_VERSION
git push
git push --tags
- name: publish
run: |
runner hatch build
runner hatch publish