Skip to content

Commit

Permalink
Add github workflow to publish geolake client on TestPyPI
Browse files Browse the repository at this point in the history
  • Loading branch information
Marco Mancini committed Jan 30, 2024
1 parent 086a028 commit fcdf88e
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 2 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/build_on_pull_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ on:
types: [opened, synchronize]
workflow_dispatch:
jobs:
build:
build-push:
name: build docker images geolake components and push to container registry
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -20,7 +21,7 @@ jobs:
build
--user
- name: Build a binary wheel and a source for drivers
run: python3 -m build ./drivers
run: python3 -m build ./drivers
- name: Set Docker image tag name
run: echo "TAG=$(date +'%Y.%m.%d.%H.%M')" >> $GITHUB_ENV
- name: Login to Scaleway Container Registry
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/publish_on_testpypi.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Build geolake client and publish to TestPyPi

on:
pull_request:
types: [opened, synchronize]
workflow_dispatch:
jobs:
client-build-and-publish:
name: Build geokube client and publish to TestPyPI
strategy:
matrix:
python-version: ["3.11"]
os: [ubuntu-latest]
permissions:
id-token: write
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install build tool
working-directory: ./client
run: python3 -m pip install build --user .
- name: Build wheels
working-directory: ./client
run: python -m build --sdist --wheel --outdir=dist/ .
- name: Publish package distributions to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: ./client/dist
repository-url: https://test.pypi.org/legacy/

0 comments on commit fcdf88e

Please sign in to comment.