diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..21280e5 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,32 @@ +name: release + +on: + push: + branches: + - npe1 + - main + tags: + - "v*" # Push events to matching v*, i.e. v1.0, v20.15.10 + workflow_dispatch: + +jobs: + release: + runs-on: ubuntu-latest + if: contains(github.ref, 'tags') + permissions: + id-token: write + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install -U setuptools setuptools_scm wheel build + - name: build + run: | + python -m build . + - name: Publish + uses: pypa/gh-action-pypi-publish@release/v1