mirror of
https://github.com/LibreTranslate/LibreTranslate.git
synced 2024-11-25 17:31:00 +00:00
c186d72f27
Bumps [actions/setup-python](https://github.com/actions/setup-python) from 4 to 5. - [Release notes](https://github.com/actions/setup-python/releases) - [Commits](https://github.com/actions/setup-python/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/setup-python dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
40 lines
906 B
YAML
40 lines
906 B
YAML
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:
|
|
|
|
tests:
|
|
uses: LibreTranslate/LibreTranslate/.github/workflows/run-tests.yml@main
|
|
secrets: inherit
|
|
|
|
|
|
publish:
|
|
needs: [ tests ]
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: '3.8'
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install build
|
|
|
|
- name: Build
|
|
run: |
|
|
pip install Babel==2.11.0
|
|
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 }}
|