diff --git a/.github/workflows/comment-bot.yml b/.github/workflows/comment-bot.yml index 4451632..b44ee7b 100644 --- a/.github/workflows/comment-bot.yml +++ b/.github/workflows/comment-bot.yml @@ -29,6 +29,7 @@ jobs: post({ owner: context.repo.owner, repo: context.repo.repo, comment_id: context.payload.comment.id, content: "eyes"}) + github-token: ${{ secrets.GH_TOKEN }} - name: Tag Commit run: | git clone https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} repo @@ -48,3 +49,4 @@ jobs: post({ owner: context.repo.owner, repo: context.repo.repo, comment_id: context.payload.comment.id, content: "rocket"}) + github-token: ${{ secrets.GH_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 39f7bd7..f9a0ce5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -85,37 +85,23 @@ jobs: - id: dist uses: casperdcl/deploy-pypi@v2 with: - build: true + pip: true gpg_key: ${{ secrets.GPG_KEY }} password: ${{ secrets.PYPI_TOKEN }} - upload: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') }} - - name: Changelog - run: git log --pretty='format:%d%n- %s%n%b---' $(git tag --sort=v:refname | tail -n2 | head -n1)..HEAD > _CHANGES.md - - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') - id: create_release - uses: actions/create-release@v1 + upload: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }} + - id: meta + name: Changelog + run: | + echo ::set-output name=tag::${GITHUB_REF#refs/tags/} + git log --pretty='format:%d%n- %s%n%b---' $(git tag --sort=v:refname | tail -n2 | head -n1)..HEAD > _CHANGES.md + - if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + uses: softprops/action-gh-release@v1 env: GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} with: - tag_name: ${{ github.ref }} - release_name: spm12 ${{ github.ref }} beta + name: spm12 ${{ steps.meta.outputs.tag }} beta body_path: _CHANGES.md draft: true - - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: dist/${{ steps.dist.outputs.whl }} - asset_name: ${{ steps.dist.outputs.whl }} - asset_content_type: application/zip - - if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') - uses: actions/upload-release-asset@v1 - env: - GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} - with: - upload_url: ${{ steps.create_release.outputs.upload_url }} - asset_path: dist/${{ steps.dist.outputs.whl_asc }} - asset_name: ${{ steps.dist.outputs.whl_asc }} - asset_content_type: text/plain + files: | + dist/${{ steps.dist.outputs.whl }} + dist/${{ steps.dist.outputs.whl_asc }} diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2fcbb14..8d77ba8 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ default_language_version: python: python3 repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v3.4.0 + rev: v4.0.1 hooks: - id: check-added-large-files - id: check-case-conflict @@ -26,19 +26,20 @@ repos: exclude: ^(.pre-commit-config.yaml|.github/workflows/test.yml)$ args: [-i] - repo: https://gitlab.com/pycqa/flake8 - rev: 3.8.4 + rev: 3.9.2 hooks: - id: flake8 + args: [-j8] additional_dependencies: - flake8-bugbear - flake8-comprehensions - flake8-debugger - flake8-string-format - repo: https://github.com/psf/black - rev: 19.10b0 + rev: 21.7b0 hooks: - id: black - repo: https://github.com/PyCQA/isort - rev: 5.7.0 + rev: 5.9.3 hooks: - id: isort