Skip to content

Commit

Permalink
ci: update
Browse files Browse the repository at this point in the history
- `pypi-publish` -> `pypi-build-publish`
- build packages in separate job
  • Loading branch information
m1stadev committed Apr 19, 2024
1 parent 832915e commit 188bc08
Showing 1 changed file with 23 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,27 +13,35 @@ on:
types: [published]

jobs:
build_pkgs:
name: Build packages
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Build sdist
run: pipx run build

- uses: actions/upload-artifact@v4
with:
name: packages
path: dist/*

pypi-publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
environment:
name: pyimg4
name: pypi
url: https://pypi.org/p/pyimg4
permissions:
id-token: write
steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'

- name: Install dependencies
run: python -m pip install -U pip poetry

- name: Build package
run: python -m poetry build
steps:
- uses: actions/download-artifact@v4
with:
name: packages
path: dist

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 188bc08

Please sign in to comment.