1
0
mirror of https://github.com/LibreTranslate/LibreTranslate.git synced 2024-11-15 04:00:11 +01:00
LibreTranslate/.github/workflows/publish-package.yml

41 lines
906 B
YAML
Raw Normal View History

name: Publish package
# Publish to PyPI when new release on GitHub, if tests pass
on:
release:
types: [created]
workflow_dispatch:
# Manual trigger in case the release needs to be rerun
jobs:
2021-02-09 15:21:53 +01:00
tests:
uses: LibreTranslate/LibreTranslate/.github/workflows/run-tests.yml@main
secrets: inherit
2022-05-03 11:09:55 +02:00
publish:
2021-02-09 15:21:53 +01:00
needs: [ tests ]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'
- name: Install dependencies
run: |
pip install build
- name: Build
run: |
2023-02-01 23:44:45 +01:00
pip install Babel==2.11.0
2023-01-12 14:23:43 +01:00
python scripts/compile_locales.py
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}