Skip to content

Commit

Permalink
Try split the jobs for building and uploading (#4)
Browse files Browse the repository at this point in the history
  • Loading branch information
NikitaBeloglazov committed Feb 8, 2024
1 parent bedd811 commit c66fcdd
Showing 1 changed file with 30 additions and 12 deletions.
42 changes: 30 additions & 12 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,21 +14,15 @@ on:

permissions:
contents: read
id-token: write

jobs:
deploy:

build:
name: Build module
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/clipman

steps:
- uses: actions/checkout@v3
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v3
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
Expand All @@ -39,5 +33,29 @@ jobs:
run: python3 tags_marker.py
- name: Build package
run: python -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
name: python-package-distributions
path: dist/

deploy:
name: Publish module to PyPI
needs:
- build
runs-on: ubuntu-latest

environment:
name: pypi
url: https://pypi.org/p/clipman

permissions:
id-token: write

- name: Download all the dists
uses: actions/download-artifact@v3
with:
name: python-package-distributions
path: dist/
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit c66fcdd

Please sign in to comment.