Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rework PyPI dist release pipeline #198

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 0 additions & 49 deletions .github/workflows/publish-pypi.yml

This file was deleted.

57 changes: 57 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Publish

on:
push:
tags:
- 'beaker-*'

jobs:
build-python-package:
strategy:
matrix:
component:
- "Common"
- "Client"
name: Build python package
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install python dependencies
run: pip install --upgrade pip && pip install build
- name: Build python package
run: cd ${{ matrix.component }} && python -m build
- name: Upload python artifacts
uses: actions/upload-artifact@v4
with:
path: ${{ matrix.component }}/dist
name: artifact-${{ matrix.component }}

publish-python-package:
needs:
- "build-python-package"
environment: production
permissions:
id-token: write
strategy:
matrix:
component:
- "Common"
- "Client"
name: Publish package to PyPI
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: artifact-${{ matrix.component }}
- name: Display structure of downloaded files
run: ls -R
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
print-hash: true