From 707baad31e447c7ff45d5ffbf1933318bcddc76a Mon Sep 17 00:00:00 2001 From: DanielArabadjiFC Date: Tue, 18 Mar 2025 14:08:03 +0000 Subject: [PATCH 1/2] Create release.yml Created workflow to deploy to pypi --- .github/workflows/release.yml | 59 +++++++++++++++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..799eeca --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,59 @@ +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + release-build: + runs-on: ubuntu-latest + permissions: + contents: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: "3.x" + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + pip install build + + - name: Build release distributions + run: python -m build + + - name: Upload distributions + uses: actions/upload-artifact@v4 + with: + name: release-dists + path: dist/ + + pypi-publish: + runs-on: ubuntu-latest + needs: release-build + permissions: + id-token: write # Required for OIDC authentication + + environment: + name: pypi + url: https://pypi.org/project/filecloudapi-python/ + + steps: + - name: Download release distributions + uses: actions/download-artifact@v4 + with: + name: release-dists + path: dist/ + + - name: Publish to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + with: + packages-dir: dist/ From 97de86cec4483b58e10c698d1fef9a4162e393e5 Mon Sep 17 00:00:00 2001 From: DanielArabadjiFC Date: Tue, 18 Mar 2025 14:22:35 +0000 Subject: [PATCH 2/2] Update main.yml Upgraded cache version to v4 --- .github/workflows/main.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 71f0341..4e49639 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -23,7 +23,7 @@ jobs: - name: Check dependencies run: make doctor - - uses: actions/cache@v2 + - uses: actions/cache@v4 with: path: .venv key: ${{ runner.os }}-poetry-${{ hashFiles('poetry.lock') }}