mirror of
https://github.com/edgewall/genshi.git
synced 2026-02-05 15:46:37 +01:00
Merge pull request #61 from edgewall/feature/move-release-to-github-actions
Add release workflow.
This commit is contained in:
94
.github/workflows/release.yml
vendored
Normal file
94
.github/workflows/release.yml
vendored
Normal file
@@ -0,0 +1,94 @@
|
||||
name: Build sdist and wheels
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
upload_to_pypi:
|
||||
description: "Upload to PyPI? Y/[N]"
|
||||
default: "N"
|
||||
|
||||
jobs:
|
||||
build_sdist:
|
||||
name: Build sdist
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
name: Install Python
|
||||
with:
|
||||
python-version: "3.6"
|
||||
|
||||
- name: Install pip build
|
||||
run: |
|
||||
python -m pip install "build"
|
||||
|
||||
- name: Build sdist tarball
|
||||
shell: bash
|
||||
run: |
|
||||
python -m build --sdist .
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: sdist
|
||||
path: |
|
||||
dist/*.tar.gz
|
||||
if-no-files-found: error
|
||||
|
||||
build_generic_wheel:
|
||||
name: Build generic wheel (without speedups)
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
# Build a wheel without speedups that can run on pure Python
|
||||
GENSHI_BUILD_SPEEDUP: 0
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
name: Install Python
|
||||
with:
|
||||
python-version: "3.6"
|
||||
|
||||
- name: Install pip build
|
||||
run: |
|
||||
python -m pip install "build"
|
||||
|
||||
- name: Build wheel
|
||||
shell: bash
|
||||
run: |
|
||||
python -m build --wheel .
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: wheels
|
||||
path: |
|
||||
dist/*.whl
|
||||
if-no-files-found: error
|
||||
|
||||
deploy:
|
||||
name: "Upload to PyPI if selected"
|
||||
if: github.event.inputs.upload_to_pypi == 'Y'
|
||||
needs: [build_sdist, build_generic_wheel]
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
TWINE_USERNAME: __token__
|
||||
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
|
||||
TWINE_NON_INTERACTIVE: 1
|
||||
TWINE_REPOSITORY: pypi
|
||||
|
||||
steps:
|
||||
- name: Download build artifacts to local runner
|
||||
uses: actions/download-artifact@v2
|
||||
|
||||
- uses: actions/setup-python@v2
|
||||
name: Install Python
|
||||
with:
|
||||
python-version: "3.10"
|
||||
|
||||
- name: Install twine
|
||||
run: |
|
||||
python -m pip install "twine"
|
||||
|
||||
- name: Upload sdist and wheel to PyPI
|
||||
run: |
|
||||
python -m twine upload --verbose wheels/*.whl sdist/*.tar.gz
|
||||
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@@ -1,4 +1,4 @@
|
||||
name: run
|
||||
name: Run test suite
|
||||
|
||||
on: [push, pull_request]
|
||||
|
||||
|
||||
26
.travis.yml
26
.travis.yml
@@ -1,26 +0,0 @@
|
||||
language: python
|
||||
matrix:
|
||||
include:
|
||||
- { python: "2.7" }
|
||||
- { python: "3.4" }
|
||||
- { python: "3.5" }
|
||||
- { python: "3.6" }
|
||||
- { python: "3.7" }
|
||||
- { python: "3.8" }
|
||||
- { python: "3.9" }
|
||||
- { python: "pypy" }
|
||||
- { python: "pypy3" }
|
||||
- { python: "nightly" }
|
||||
allow_failures:
|
||||
- python: "nightly"
|
||||
script:
|
||||
- "python setup.py test"
|
||||
deploy:
|
||||
provider: pypi
|
||||
user: edgewall-org
|
||||
password:
|
||||
secure: "W86OIU/V9PbXdERXbR1vTOw/GvxoNyn5gt7n52TGqjI1BcklX1t31uPgBnf0wmlp/kY9vMbOYhuqUWpBhbMKMBY6zOuNnCV0H5vynZ/nWefSBK6Fqyl2zTsdLYfzUKAIPBldYcaiJMZ6eD++ujVsgWN6XglP7jYogqjJFxxNf6s="
|
||||
distributions: "sdist bdist_wheel"
|
||||
on:
|
||||
tags: true
|
||||
python: "3.6"
|
||||
Reference in New Issue
Block a user