mirror of
https://github.com/aiogram/aiogram.git
synced 2025-12-16 12:07:13 +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:
|
steps:
|
||||||
- uses: actions/checkout@master
|
- uses: actions/checkout@master
|
||||||
|
|
||||||
- name: Set up Python 3.10
|
- name: Set up Python 3.11
|
||||||
uses: actions/setup-python@v4
|
uses: actions/setup-python@v4
|
||||||
with:
|
with:
|
||||||
python-version: "3.10"
|
python-version: "3.11"
|
||||||
|
|
||||||
- name: Install build dependencies
|
- 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
|
- name: Build source distribution
|
||||||
run: python -m build .
|
run: python -m build .
|
||||||
|
|
@ -40,8 +47,12 @@ jobs:
|
||||||
publish:
|
publish:
|
||||||
name: Publish
|
name: Publish
|
||||||
needs: build
|
needs: build
|
||||||
if: "success() && startsWith(github.ref, 'refs/tags/')"
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
environment:
|
||||||
|
name: pypi
|
||||||
|
url: https://pypi.org/project/aiogram/${{ steps.package-version.outputs.value }}/
|
||||||
|
permissions:
|
||||||
|
id-token: write
|
||||||
steps:
|
steps:
|
||||||
- name: Download artifacts
|
- name: Download artifacts
|
||||||
uses: actions/download-artifact@v1
|
uses: actions/download-artifact@v1
|
||||||
|
|
@ -49,17 +60,5 @@ jobs:
|
||||||
name: dist
|
name: dist
|
||||||
path: 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
|
- name: Publish a Python distribution to PyPI
|
||||||
uses: pypa/gh-action-pypi-publish@master
|
uses: pypa/gh-action-pypi-publish@release/v1
|
||||||
# if: github.event.action == 'published'
|
|
||||||
with:
|
|
||||||
user: __token__
|
|
||||||
password: ${{ secrets.PYPI_TOKEN }}
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue