Skip to content

Commit

Permalink
Separated build and upload jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
agronholm committed Jul 27, 2023
1 parent cc5cc54 commit 7b2da6b
Showing 1 changed file with 22 additions and 5 deletions.
27 changes: 22 additions & 5 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,17 @@ name: Publish packages to PyPI

on:
push:
branches: [test-new-build]
tags:
- "[0-9]+.[0-9]+.[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+.post[0-9]+"
- "[0-9]+.[0-9]+.[0-9]+[a-b][0-9]+"
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"

jobs:
publish:
build:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v3
- name: Set up Python
Expand All @@ -24,5 +23,23 @@ jobs:
run: pip install build
- name: Create packages
run: python -m build
- name: Upload packages
uses: pypa/gh-action-pypi-publish@release/v1
- name: Archive packages
uses: actions/upload-artifact@v3
with:
name: dist
path: dist

publish:
needs: build
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- name: Retrieve packages
uses: actions/download-artifact@v3
with:
name: dist
- run: tree
# - name: Upload packages
# uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit 7b2da6b

Please sign in to comment.