Skip to content

Update image URLs in README.md #3

Update image URLs in README.md

Update image URLs in README.md #3

Workflow file for this run

name: ci-testpypi
on:
push:
paths:
- '.github/workflows/ci-testpypi.yml'
- 'pyproject.toml'
workflow_run:
workflows: ["ci-unittest"]
types:
- completed
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TESTPYPI_TOKEN }}
jobs:
testpypi-py3-build-and-upload:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success') }}
outputs:
new_version: ${{ steps.bump-version.outputs.new_version }}
strategy:
fail-fast: false
matrix:
python-version: ['3.12.3']
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install --upgrade pip
pip install build twine
- name: Bump version without commit and tag
id: bump-version
run: |
suffix="dev-$(date +%Y%m%d%H%M)"
current_version=$(bump-my-version show-bump | awk 'NR==1 {print $1}')
new_versoin="${current_version}.${suffix}"
bump-my-version bump --verbose --no-commit --no-tag --new-version "${new_versoin}" suffix_N
echo "::set-output name=new_version::${new_versoin}"
- name: Build source and binary distributions
run: python -m build
- name: Upload to TestPyPI
run: twine upload --repository testpypi dist/*
testpypi-py3-install:
runs-on: ubuntu-latest
needs: testpypi-py3-build-and-upload
strategy:
fail-fast: false
matrix:
python-version: ['3.12.3']
env:
NEW_VERSION: ${{ needs.testpypi-py3-build-and-upload.outputs.new_version }}
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: pip install --upgrade pip
- name: Install from binary distribution
env:
PIP_INDEX_URL: https://test.pypi.org/simple/
run: |
pip install --no-deps --only-binary shadowsocks-manager shadowsocks-manager==${{ env.NEW_VERSION }}
- name: Clean up for installing source distribution
run: |
pip uninstall -y shadowsocks-manager
- name: Install from source distribution with PEP 517 required
env:
PIP_INDEX_URL: https://test.pypi.org/simple/
run: |
pip install --use-pep517 --no-deps --no-binary shadowsocks-manager shadowsocks-manager==${{ env.NEW_VERSION }}
testpypi-py2-install:
runs-on: ubuntu-latest
needs: testpypi-py3-build-and-upload
container:
image: python:2.7
env:
NEW_VERSION: ${{ needs.testpypi-py3-build-and-upload.outputs.new_version }}
steps:
- name: Install dependencies
run: |
pip install --upgrade pip
pip install setuptools wheel
- name: Install from binary distribution
env:
PIP_INDEX_URL: https://test.pypi.org/simple/
run: |
pip install --no-deps --only-binary shadowsocks-manager shadowsocks-manager==${{ env.NEW_VERSION }}
- name: Clean up for install source distribution
run: |
pip uninstall -y shadowsocks-manager
- name: Install from source distribution with setuptools and wheel required
env:
PIP_INDEX_URL: https://test.pypi.org/simple/
run: |
pip install --no-deps --no-binary --no-build-isolation shadowsocks-manager shadowsocks-manager==${{ env.NEW_VERSION }}