Skip to content

Commit

Permalink
publish
Browse files Browse the repository at this point in the history
  • Loading branch information
mariugul committed Aug 22, 2024
1 parent 69dc716 commit d4e0b57
Showing 1 changed file with 17 additions and 7 deletions.
24 changes: 17 additions & 7 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Python Package Workflow
name: Python Package Dispatch

on:
workflow_dispatch: # Allows manual triggering of the workflow
Expand All @@ -7,8 +7,8 @@ jobs:
build-and-publish:
runs-on: ubuntu-latest
env:
POETRY_HOME: /opt/poetry
POETRY_BIN: /opt/poetry/bin
POETRY_HOME: /opt/poetry
VENV_PATH: ${{ runner.tool_cache }}/venv
steps:
- name: Checkout code
uses: actions/checkout@v4
Expand All @@ -18,19 +18,29 @@ jobs:
with:
python-version: "3.8"

- name: Cache Python dependencies
id: cache-python-deps
uses: actions/cache@v3
with:
path: ${{ env.VENV_PATH }}
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
restore-keys: |
venv-${{ runner.os }}-
- name: Install Poetry
if: steps.cache-python-deps.outputs.cache-hit != 'true'
run: |
python3 -m venv $POETRY_HOME
$POETRY_BIN/pip install poetry==1.8.2
$POETRY_BIN/poetry --version
${{ env.VENV_PATH }}/bin/pip install poetry==1.8.2
${{ env.VENV_PATH }}/bin/poetry --version
- name: Install Package
run: |
$POETRY_BIN/poetry install
${{ env.VENV_PATH }}/bin/poetry install
- name: Build Package
run: |
$POETRY_BIN/poetry build
${{ env.VENV_PATH }}/bin/poetry build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit d4e0b57

Please sign in to comment.