Skip to content

Commit

Permalink
Rework release pipeline
Browse files Browse the repository at this point in the history
Signed-off-by: Martin Styk <mart.styk@gmail.com>
  • Loading branch information
StykMartin committed Dec 30, 2023
1 parent 1b4e12c commit 4adb91e
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 49 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/publish-pypi.yml

This file was deleted.

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

on: [pull_request]


jobs:
create-python-package:
strategy:
matrix:
component: ["Common", "Client"]
runs-on: ubuntu-latest
outputs:
hash: ${{ steps.hash.outputs.hash }}
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: Generate hash
id: hash
run: cd ${{ matrix.component }}/dist && echo "hash=$(sha256sum * | base64 -w0)" >> $GITHUB_OUTPUT
- name: Upload python artifacts
uses: actions/upload-artifact@a8a3f3ad30e3422c9c7b888a15615d19a852ae32
with:
path: ${{ matrix.component }}/dist

#
# pypi-publish-common:
# name: Upload beaker-common release to PyPI
# runs-on: ubuntu-latest
# environment: production
# permissions:
# id-token: write
# steps:
# -
# - name: Publish package distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# packages-dir: artifacts/
#
# pypi-publish-client:
# name: Upload beaker-client release to PyPI
# runs-on: ubuntu-latest
# environment: production
# permissions:
# id-token: write
# steps:
# -
# - name: Publish package distributions to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1
# with:
# packages-dir: artifacts/

0 comments on commit 4adb91e

Please sign in to comment.