summaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml3
-rw-r--r--.github/workflows/release.yml44
2 files changed, 47 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 296bf0d..d163412 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -2,6 +2,9 @@ name: Python package
on: [push, pull_request]
+env:
+ DOCKER_BUILDKIT: '1'
+
jobs:
flake8:
runs-on: ubuntu-latest
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..50695b1
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,44 @@
+name: Release
+
+on:
+ workflow_dispatch:
+ inputs:
+ tag:
+ description: "Release Tag WITHOUT `v` Prefix (e.g. 6.0.0)"
+ required: true
+ dry-run:
+ description: 'Dry run'
+ required: false
+ type: boolean
+ default: true
+
+jobs:
+ publish:
+ runs-on: ubuntu-22.04
+ steps:
+ - uses: actions/checkout@v3
+
+ - uses: actions/setup-python@v4
+ with:
+ python-version: '3.10'
+
+ - run: python setup.py sdist bdist_wheel
+ env:
+ SETUPTOOLS_SCM_PRETEND_VERSION_FOR_DOCKER: ${{ inputs.tag }}
+
+ - name: Publish to PyPI
+ uses: pypa/gh-action-pypi-publish@release/v1
+ if: ! inputs.dry-run
+ with:
+ password: ${{ secrets.PYPI_API_TOKEN }}
+
+ - name: Create GitHub release
+ uses: ncipollo/release-action@v1
+ if: ! inputs.dry-run
+ with:
+ artifacts: "dist/*"
+ generateReleaseNotes: true
+ draft: true
+ commit: ${{ github.sha }}
+ token: ${{ secrets.GITHUB_TOKEN }}
+ tag: ${{ inputs.tag }}