mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-13 10:26:53 +00:00
Update publish pipeline
This commit is contained in:
parent
fcf9454e13
commit
71e7e62e36
1 changed files with 16 additions and 17 deletions
33
.github/workflows/pypi-release.yml
vendored
33
.github/workflows/pypi-release.yml
vendored
|
|
@ -12,13 +12,20 @@ jobs:
|
|||
steps:
|
||||
- uses: actions/checkout@master
|
||||
|
||||
- name: Set up Python 3.10
|
||||
- name: Set up Python 3.11
|
||||
uses: actions/setup-python@v4
|
||||
with:
|
||||
python-version: "3.10"
|
||||
python-version: "3.11"
|
||||
|
||||
- name: Install build dependencies
|
||||
run: python -m pip install --upgrade build
|
||||
run: python -m pip install --upgrade build hatch
|
||||
|
||||
- name: Resolve version
|
||||
id: package-version
|
||||
run: echo "value=$(echo ${{ github.ref }} | sed -e 's/refs\/tags\/v//')" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Bump version
|
||||
run: hatch version ${{ steps.package-version.outputs.value }}
|
||||
|
||||
- name: Build source distribution
|
||||
run: python -m build .
|
||||
|
|
@ -40,8 +47,12 @@ jobs:
|
|||
publish:
|
||||
name: Publish
|
||||
needs: build
|
||||
if: "success() && startsWith(github.ref, 'refs/tags/')"
|
||||
runs-on: ubuntu-latest
|
||||
environment:
|
||||
name: pypi
|
||||
url: https://pypi.org/project/aiogram/${{ steps.package-version.outputs.value }}/
|
||||
permissions:
|
||||
id-token: write
|
||||
steps:
|
||||
- name: Download artifacts
|
||||
uses: actions/download-artifact@v1
|
||||
|
|
@ -49,17 +60,5 @@ jobs:
|
|||
name: dist
|
||||
path: dist
|
||||
|
||||
# - name: Publish a Python distribution to Test PyPI
|
||||
# uses: pypa/gh-action-pypi-publish@master
|
||||
## if: github.event.action != 'published'
|
||||
# with:
|
||||
# user: __token__
|
||||
# password: ${{ secrets.PYPI_TEST_TOKEN }}
|
||||
# repository_url: https://test.pypi.org/legacy/
|
||||
|
||||
- name: Publish a Python distribution to PyPI
|
||||
uses: pypa/gh-action-pypi-publish@master
|
||||
# if: github.event.action == 'published'
|
||||
with:
|
||||
user: __token__
|
||||
password: ${{ secrets.PYPI_TOKEN }}
|
||||
uses: pypa/gh-action-pypi-publish@release/v1
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue