Skip to content

Commit 450d761

Browse files
committed
build: misc framework updates
1 parent 2289861 commit 450d761

File tree

3 files changed

+20
-31
lines changed

3 files changed

+20
-31
lines changed

.github/workflows/comment-bot.yml

+2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ jobs:
2929
post({
3030
owner: context.repo.owner, repo: context.repo.repo,
3131
comment_id: context.payload.comment.id, content: "eyes"})
32+
github-token: ${{ secrets.GH_TOKEN }}
3233
- name: Tag Commit
3334
run: |
3435
git clone https://${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY} repo
@@ -48,3 +49,4 @@ jobs:
4849
post({
4950
owner: context.repo.owner, repo: context.repo.repo,
5051
comment_id: context.payload.comment.id, content: "rocket"})
52+
github-token: ${{ secrets.GH_TOKEN }}

.github/workflows/test.yml

+13-27
Original file line numberDiff line numberDiff line change
@@ -85,37 +85,23 @@ jobs:
8585
- id: dist
8686
uses: casperdcl/deploy-pypi@v2
8787
with:
88-
build: true
88+
pip: true
8989
gpg_key: ${{ secrets.GPG_KEY }}
9090
password: ${{ secrets.PYPI_TOKEN }}
91-
upload: ${{ github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags') }}
92-
- name: Changelog
93-
run: git log --pretty='format:%d%n- %s%n%b---' $(git tag --sort=v:refname | tail -n2 | head -n1)..HEAD > _CHANGES.md
94-
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
95-
id: create_release
96-
uses: actions/create-release@v1
91+
upload: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
92+
- id: meta
93+
name: Changelog
94+
run: |
95+
echo ::set-output name=tag::${GITHUB_REF#refs/tags/}
96+
git log --pretty='format:%d%n- %s%n%b---' $(git tag --sort=v:refname | tail -n2 | head -n1)..HEAD > _CHANGES.md
97+
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
98+
uses: softprops/action-gh-release@v1
9799
env:
98100
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
99101
with:
100-
tag_name: ${{ github.ref }}
101-
release_name: spm12 ${{ github.ref }} beta
102+
name: spm12 ${{ steps.meta.outputs.tag }} beta
102103
body_path: _CHANGES.md
103104
draft: true
104-
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
105-
uses: actions/upload-release-asset@v1
106-
env:
107-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
108-
with:
109-
upload_url: ${{ steps.create_release.outputs.upload_url }}
110-
asset_path: dist/${{ steps.dist.outputs.whl }}
111-
asset_name: ${{ steps.dist.outputs.whl }}
112-
asset_content_type: application/zip
113-
- if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')
114-
uses: actions/upload-release-asset@v1
115-
env:
116-
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
117-
with:
118-
upload_url: ${{ steps.create_release.outputs.upload_url }}
119-
asset_path: dist/${{ steps.dist.outputs.whl_asc }}
120-
asset_name: ${{ steps.dist.outputs.whl_asc }}
121-
asset_content_type: text/plain
105+
files: |
106+
dist/${{ steps.dist.outputs.whl }}
107+
dist/${{ steps.dist.outputs.whl_asc }}

.pre-commit-config.yaml

+5-4
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ default_language_version:
22
python: python3
33
repos:
44
- repo: https://github.com/pre-commit/pre-commit-hooks
5-
rev: v3.4.0
5+
rev: v4.0.1
66
hooks:
77
- id: check-added-large-files
88
- id: check-case-conflict
@@ -26,19 +26,20 @@ repos:
2626
exclude: ^(.pre-commit-config.yaml|.github/workflows/test.yml)$
2727
args: [-i]
2828
- repo: https://gitlab.com/pycqa/flake8
29-
rev: 3.8.4
29+
rev: 3.9.2
3030
hooks:
3131
- id: flake8
32+
args: [-j8]
3233
additional_dependencies:
3334
- flake8-bugbear
3435
- flake8-comprehensions
3536
- flake8-debugger
3637
- flake8-string-format
3738
- repo: https://github.com/psf/black
38-
rev: 19.10b0
39+
rev: 21.7b0
3940
hooks:
4041
- id: black
4142
- repo: https://github.com/PyCQA/isort
42-
rev: 5.7.0
43+
rev: 5.9.3
4344
hooks:
4445
- id: isort

0 commit comments

Comments
 (0)