]> git.madduck.net Git - etc/vim.git/commitdiff

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

Add a GitHub Action to build + Upload black to PyPI (#1848)
authorCooper Lees <me@cooperlees.com>
Thu, 1 Apr 2021 16:41:55 +0000 (09:41 -0700)
committerGitHub <noreply@github.com>
Thu, 1 Apr 2021 16:41:55 +0000 (18:41 +0200)
* Add a GitHub Action to build + Upload black to PyPI
- Build a wheel + sdist
- Upload via twine using token stored in GitHub secrets

.github/workflows/lint.yml
.github/workflows/pypi_upload.yml [new file with mode: 0644]
.pre-commit-config.yaml

index e01e9ade5e20941c2cf832ac1e93dc65c97dfb81..c46042d71b9f0baed8118a6a8655cfb78f33d051 100644 (file)
@@ -12,17 +12,14 @@ jobs:
       github.repository
 
     runs-on: ubuntu-latest
       github.repository
 
     runs-on: ubuntu-latest
-    strategy:
-      matrix:
-        python-version: [3.7]
 
     steps:
       - uses: actions/checkout@v2
 
 
     steps:
       - uses: actions/checkout@v2
 
-      - name: Set up Python ${{ matrix.python-version }}
+      - name: Set up Python
         uses: actions/setup-python@v2
         with:
         uses: actions/setup-python@v2
         with:
-          python-version: ${{ matrix.python-version }}
+          python-version: 3.7
 
       - name: Install dependencies
         run: |
 
       - name: Install dependencies
         run: |
diff --git a/.github/workflows/pypi_upload.yml b/.github/workflows/pypi_upload.yml
new file mode 100644 (file)
index 0000000..5df91d9
--- /dev/null
@@ -0,0 +1,31 @@
+name: pypi_upload
+
+on:
+  release:
+    types: created
+
+jobs:
+  build:
+    name: PyPI Upload
+    runs-on: ubuntu-latest
+
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Set up Python
+        uses: actions/setup-python@v2
+
+      - name: Install latest pip, setuptools, twine + wheel
+        run: |
+          python -m pip install --upgrade pip setuptools twine wheel
+
+      - name: Build wheels
+        run: |
+          python setup.py bdist_wheel
+          python setup.py sdist
+
+      - name: Upload to PyPI via Twine
+        env:
+          TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
+        run: |
+          twine upload --verbose -u '__token__' dist/*
index 292ed5727d9b3afa10aa2e8ee6a3dce11f28c7b8..48a7429c1f2e73c78c443aaf2a95b05a99bb0598 100644 (file)
@@ -13,7 +13,7 @@ repos:
         types_or: [python, pyi]
 
   - repo: https://gitlab.com/pycqa/flake8
         types_or: [python, pyi]
 
   - repo: https://gitlab.com/pycqa/flake8
-    rev: 3.8.1
+    rev: 3.8.4
     hooks:
       - id: flake8
         additional_dependencies: [flake8-bugbear]
     hooks:
       - id: flake8
         additional_dependencies: [flake8-bugbear]