diff --git a/.github/workflows/pylint.yml b/.github/workflows/pylint.yml index 0805af7..234c65b 100644 --- a/.github/workflows/pylint.yml +++ b/.github/workflows/pylint.yml @@ -1,22 +1,18 @@ name: Pylint - on: [push] - jobs: build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - name: Set up Python 3.9 - uses: actions/setup-python@v2 - with: - python-version: 3.9 - - name: Install dependencies - run: | - python -m pip install --upgrade pip - pip install pylint - - name: Analysing the code with pylint - run: | - pylint `ls -R|grep .py$|xargs` + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install pylint + - name: Analysing the code with pylint + run: | + pylint `ls -R src|grep .py$|xargs` diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8e72149 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,26 @@ +name: Release to PyPi + +on: + release: + types: [published] + +jobs: + rollout: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up Python 3.9 + uses: actions/setup-python@v2 + with: + python-version: 3.9 + - name: Install pypa/build + run: >- + python -m pip install build --user + - name: Build a binary wheel and a source tarball + run: >- + python -m build --sdist --wheel --outdir dist/ + - name: Publish distribution to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@master + with: + password: ${{ secrets.PYPI_API_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 6fa4842..0000000 --- a/.travis.yml +++ /dev/null @@ -1,18 +0,0 @@ -# Build matrix / environment variable are explained on: -# https://docs.travis-ci.com/user/customizing-the-build/ -# This file can be validated on: -# http://lint.travis-ci.org/ - -language: python 3.6 -cache: pip - -# First run the test. Then run all demos one-by-one. -script: - - ./test/dongbei_test.py && ls demo/*.dongbei | xargs -L 1 ./src/dongbei.py --xudao - -deploy: - provider: pypi - user: "__token__" - password: "pypi-AgEIcHlwaS5vcmcCJDg3NGQ1NDM4LWMwNDUtNDQ4MC05ZDE0LTRkYmNjMTA0OWZjMgACPXsicGVybWlzc2lvbnMiOiB7InByb2plY3RzIjogWyJkb25nYmVpLWxhbmciXX0sICJ2ZXJzaW9uIjogMX0AAAYg2Pylk-luUO4OvrXUWmEVoH7R75PRz7R7ek9pHdQSzqA" - on: - tags: true