From 68ba4bc5196e7ec4286dcffc054199f73850103b Mon Sep 17 00:00:00 2001 From: Sergei Pikhovkin Date: Fri, 22 Dec 2023 20:29:20 +0200 Subject: [PATCH] Add publish workflow --- .github/workflows/publish.yaml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 .github/workflows/publish.yaml diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..de677cd --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,25 @@ +name: publish + +on: + release: + types: [created] + +jobs: + build-and-publish: + if: github.event_name == 'release' && github.event.action == 'created' + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: '3.11' + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install hatch + - name: Build package + run: hatch build + - name: Publish package + run : | + hatch publish -u __token__ -a ${{ secrets.PYPI_API_TOKEN }}