From e09ced3042dbb6e7aec2d12032196fc12c542861 Mon Sep 17 00:00:00 2001 From: xbrianh <32105697+xbrianh@users.noreply.github.com> Date: Mon, 2 Sep 2024 21:42:20 +0000 Subject: [PATCH] wip --- .github/workflows/{tox.yml => cicd.yml} | 17 ++++++++++++++++- README.md | 2 +- 2 files changed, 17 insertions(+), 2 deletions(-) rename .github/workflows/{tox.yml => cicd.yml} (73%) diff --git a/.github/workflows/tox.yml b/.github/workflows/cicd.yml similarity index 73% rename from .github/workflows/tox.yml rename to .github/workflows/cicd.yml index df35fd1..6519581 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/cicd.yml @@ -10,7 +10,7 @@ on: branches: [ "main" ] jobs: - build: + test: runs-on: ubuntu-latest strategy: fail-fast: false @@ -47,3 +47,18 @@ jobs: AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} run: tox + pypi-publish: + if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') + name: Upload release to PyPI + runs-on: ubuntu-latest + environment: + name: pypi + url: https://pypi.org/p/xdlake + permissions: + id-token: write # IMPORTANT: this permission is mandatory for trusted publishing + steps: + - name: Build + run: | + make build + - name: Publish package distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 diff --git a/README.md b/README.md index 4bbc8bd..fc63ffb 100644 --- a/README.md +++ b/README.md @@ -129,4 +129,4 @@ Please report bugs, issues, feature requests, etc. on [GitHub](https://github.co [launch gitpod workspace](https://gitpod.io/#https://github.com/xbrianh/xdlake) ## Build Status -![main](https://github.com/xbrianh/xdlake/actions/workflows/tox.yml/badge.svg) +![main](https://github.com/xbrianh/xdlake/actions/workflows/cicd.yml/badge.svg)