diff --git a/.bumpversion.cfg b/.bumpversion.cfg index 85f7443..7760714 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 0.1.11 +current_version = 0.1.7 commit = True tag = True diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index a860525..7a5a569 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -17,20 +17,19 @@ jobs: - name: Set up Python uses: actions/setup-python@v2 with: - python-version: 3.8 + python-version: 3. + + - name: Get the version + id: get_version + run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//} - name: Install dependencies run: | python -m pip install build towncrier - - - name: Create Release - uses: actions/create-release@v1 - env: - GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} - with: - tag_name: ${{ github.ref }} - release_name: Release ${{ github.ref }} - body: $(towncrier --draft) + + - name: Generate release notes + run: | + towncrier --draft > release_notes.txt - name: Generate version notes with towncrier run: | @@ -49,3 +48,32 @@ jobs: env: TWINE_USERNAME: __token__ TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} + + - name: Create Release + uses: actions/create-release@v1 + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + with: + tag_name: ${{ github.ref }} + release_name: Release ${{ github.ref }} + body_path: release_notes.txt + + - name: Upload Release Asset gz + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./package/dist/NeteaseCloudMusic-${{ steps.get_version.outputs.VERSION }}.tar.gz + asset_name: NeteaseCloudMusic-${{ steps.get_version.outputs.VERSION }}.tar.gz + asset_content_type: application/zip + + - name: Upload Release Asset whl + uses: actions/upload-release-asset@v1 + env: + GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} + with: + upload_url: ${{ steps.create_release.outputs.upload_url }} + asset_path: ./package/dist/NeteaseCloudMusic-${{ steps.get_version.outputs.VERSION }}-py2.py3-none-any.whl + asset_name: NeteaseCloudMusic-${{ steps.get_version.outputs.VERSION }}-py2.py3-none-any.whl + asset_content_type: application/zip diff --git a/package/NeteaseCloudMusic/__init__.py b/package/NeteaseCloudMusic/__init__.py index 45d9ded..18f2766 100644 --- a/package/NeteaseCloudMusic/__init__.py +++ b/package/NeteaseCloudMusic/__init__.py @@ -2,4 +2,4 @@ from .main import NeteaseCloudMusicApi from .help import api_help, api_list from .utils import format_cookie_str, prase_cookie_str -__version__ = '0.1.11' +__version__ = '0.1.7' diff --git a/package/setup.py b/package/setup.py index 9bf7ba5..bc0eff1 100644 --- a/package/setup.py +++ b/package/setup.py @@ -19,7 +19,7 @@ URL = 'https://github.com/2061360308/NeteaseCloudMusic_PythonSDK' EMAIL = '2061360308@qq.com' AUTHOR = '盧瞳' REQUIRES_PYTHON = '>=3.6.0' -VERSION = '0.1.11' +VERSION = '0.1.7' UPDATA_INFO = ('修复了初次使用时没有cookie导致的一系列问题\n' '修复了NeteaseCloudMusicApi.js没有更新的问题\n' '添加了对于cookie的判断,现在可以正常判断cookie是否过期了')