Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
backup
Browse files Browse the repository at this point in the history
davidkhala committed Nov 15, 2024
1 parent 7f38228 commit 773028e
Showing 4 changed files with 50 additions and 40 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/libs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python

name: libraries

on:
push:

permissions:
contents: read

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@main
with:
python-version: "3.13"
- name: Install Poetry
uses: snok/install-poetry@main
- name: Install dependencies
run: poetry install
- name: Test with pytest
run: pytest
working-directory: test
18 changes: 18 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
on:
workflow_dispatch:

name: publish libraries
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Set up Python
uses: actions/setup-python@main
with:
python-version: "3.13"
- name: Install Poetry
uses: snok/install-poetry@main
- run: poetry build
- run: poetry config http-basic.pypi __token__ ${{secrets.PYPI_TOKEN}}
- run: poetry publish
38 changes: 0 additions & 38 deletions .github/workflows/python-app.yml

This file was deleted.

5 changes: 3 additions & 2 deletions poetry/README.md
Original file line number Diff line number Diff line change
@@ -21,9 +21,10 @@


## publish
`poetry publish --build`
- `poetry publish --build` will prompt for confirm
- For no-interaction publish. You need `poetry build` in advanced
- [configure credential](https://python-poetry.org/docs/repositories/#configuring-credentials)
- for pypi: `poetry config http-basic.pypi <username> <password>`
- for pypi: `poetry config http-basic.pypi __token__ <PYPI_TOKEN>`

## clean up
1. find your environment by `poetry env list`

0 comments on commit 773028e

Please sign in to comment.