Skip to content

Update user.url_link #758

Update user.url_link

Update user.url_link #758

Workflow file for this run

name: PyPI
on: [push, pull_request]
jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Test
run: make test
# - name: Upload coverage to Codecov
# uses: codecov/codecov-action@v2
# with:
# directory: ./coverage/reports/
# env_vars: OS,PYTHON
# fail_ci_if_error: true
# files: ./coverage.xml
# flags: unittests
# verbose: true
pack:
name: Pack
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
make install
- name: Pack Testing
run: |
make dist
echo "To be add: pack testing"
deploy:
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/develop-ui' || startsWith(github.ref, 'refs/heads/v'))
name: Deploy
needs: [build, pack]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
make install
- name: Check Branch
id: check-branch
run: |
if [[ ${{ github.ref }} =~ ^refs/heads/(master|develop-ui|v[0-9]+\.[0-9]+.*)$ ]]; then
echo ::set-output name=match::true
fi # See: https://stackoverflow.com/a/58869470/1123955
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Building Wechaty-ui
id: build-ui
run: |
make ui
- name: Is A Publish Branch
if: steps.check-branch.outputs.match == 'true'
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
make deploy-version
python setup.py sdist bdist_wheel
twine upload --skip-existing dist/*
- name: Is Not A Publish Branch
if: steps.check-branch.outputs.match != 'true'
run: echo 'Not A Publish Branch'