Skip to content

Commit

Permalink
build: misc framework updates
Browse files Browse the repository at this point in the history
  • Loading branch information
casperdcl committed Aug 11, 2021
1 parent 2289861 commit 450d761
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 31 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/comment-bot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
40 changes: 13 additions & 27 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
9 changes: 5 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit 450d761

Please sign in to comment.