From a9a22ebe8fd9988d1c973269f110cead98257671 Mon Sep 17 00:00:00 2001 From: Evgenii Gorchakov Date: Wed, 23 Oct 2024 14:53:13 +0200 Subject: [PATCH] chore: pypi release --- .github/workflows/build.yaml | 29 ------------------ .github/workflows/release.yaml | 54 ++++++++++++++++++++++++++++++++++ README.md | 2 +- 3 files changed, 55 insertions(+), 30 deletions(-) delete mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index f4cb227..0000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,29 +0,0 @@ ---- -name: build - -on: - push: - branches: [main] - tags: ["*"] - - release: - types: [published] - - workflow_dispatch: - -jobs: - build-wheels: - runs-on: ubuntu-latest - steps: - - name: setup ssh - uses: webfactory/ssh-agent@v0.9.0 - with: - ssh-private-key: ${{ secrets.YAAK_IDL_REPO_SSH_KEY }} - - - name: checkout - uses: actions/checkout@v4 - with: - submodules: recursive - persist-credentials: false - - - uses: hynek/build-and-inspect-python-package@v2.9.0 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml new file mode 100644 index 0000000..bcf9ac2 --- /dev/null +++ b/.github/workflows/release.yaml @@ -0,0 +1,54 @@ +--- +name: release + +on: + push: + branches: [main] + tags: ["*"] + + release: + types: [published] + + workflow_dispatch: + +permissions: + attestations: write + contents: read + id-token: write + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: setup ssh + uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.YAAK_IDL_REPO_SSH_KEY }} + + - name: checkout + uses: actions/checkout@v4 + with: + submodules: recursive + persist-credentials: false + fetch-depth: 0 + + - name: build and inspect + uses: hynek/build-and-inspect-python-package@v2.9.0 + with: + attest-build-provenance-github: "true" + + release: + environment: release + if: github.event.action == 'published' + runs-on: ubuntu-latest + needs: build + + steps: + - uses: actions/download-artifact@v4 + with: + name: Packages + path: dist + + - uses: pypa/gh-action-pypi-publish@release/v1 + with: + attestations: true diff --git a/README.md b/README.md index 74b202e..7529d18 100644 --- a/README.md +++ b/README.md @@ -15,7 +15,7 @@ ## Installation ```bash -uv add https://github.com/yaak-ai/rbyte/releases/latest/download/rbyte-X.Y.Z-py3-none-any.whl [--extra ] +uv add rbyte [--extra ] ``` See [pyproject.toml](./pyproject.toml) for available extras.