Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

actions: pipy publish package use poetry #2

Merged
merged 1 commit into from
May 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading