Skip to content

Separated build and upload jobs #26

Separated build and upload jobs

Separated build and upload jobs #26

Workflow file for this run

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:
build:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: pip install build
- name: Create packages
run: python -m build
- 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