Skip to content

Commit

Permalink
actions: pipy publish package use poetry
Browse files Browse the repository at this point in the history
Co-Authored-by: Johnny Mariéthoz <Johnny.Mariethoz@rero.ch>
  • Loading branch information
jma committed May 27, 2024
1 parent 2de7bda commit 7d6ab01
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 18 deletions.
25 changes: 10 additions & 15 deletions .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,23 +26,18 @@ on:
jobs:
build-n-publish:
runs-on: ubuntu-latest
environment: pypi
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7

- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel babel
- name: Build package
python-version: 3.9

- name: Install Poetry
uses: snok/install-poetry@v1

- name: poetry-publish
run: |
python setup.py compile_catalog sdist bdist_wheel
- name: pypi-publish
uses: pypa/gh-action-pypi-publish@v1.3.1
with:
user: __token__

password: ${{ secrets.pypi_token }}

poetry publish --build -u __token__ -p ${{ secrets.PYPI_TOKEN }}
6 changes: 3 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ on:
pull_request:
branches:
- main
- "staging"
- staging
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 3 * * 6"
Expand Down Expand Up @@ -78,5 +78,5 @@ jobs:
run: |
poetry run ./run-tests.sh
- name: Run build
run: poetry build
- name: Test publish in dry run mode
run: poetry publish --build --dry-run

0 comments on commit 7d6ab01

Please sign in to comment.