mirror of
https://github.com/qilingframework/qiling.git
synced 2026-10-12 02:21:40 +00:00
48 lines
1.2 KiB
YAML
48 lines
1.2 KiB
YAML
name: PyPI 📦 Distribution
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Set up Python
|
|
uses: actions/setup-python@v1
|
|
with:
|
|
python-version: '3.x'
|
|
- name: Install dependencies
|
|
run: |
|
|
pip install setuptools wheel
|
|
- name: Build distribution 📦
|
|
run: |
|
|
pip install .
|
|
python setup.py sdist bdist_wheel
|
|
- uses: actions/upload-artifact@v2
|
|
with:
|
|
path: ${{ github.workspace }}/dist/*
|
|
|
|
publish:
|
|
needs: [build]
|
|
runs-on: ubuntu-latest
|
|
if: startsWith(github.ref, 'refs/tags')
|
|
steps:
|
|
- uses: actions/download-artifact@v2
|
|
with:
|
|
name: artifact
|
|
path: dist
|
|
|
|
- name: Publish distribution 📦 to test PyPI
|
|
uses: pypa/gh-action-pypi-publish@master
|
|
with:
|
|
user: __token__
|
|
password: ${{ secrets.testpypi_pass }}
|
|
repository_url: https://test.pypi.org/legacy/
|
|
|
|
- name: Publish distribution 📦 to PyPI
|
|
if: ${{ success() }}
|
|
uses: pypa/gh-action-pypi-publish@master
|
|
with:
|
|
user: __token__
|
|
password: ${{ secrets.pypi_pass }}
|