From b7a85b7cba9ec225c7ab1f02d6ad8c924aa83a67 Mon Sep 17 00:00:00 2001 From: JHKru Date: Sun, 13 Jul 2025 18:47:28 +0200 Subject: [PATCH 1/3] Update CI --- .github/workflows/deploy.yml | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4b2ab36..70292b7 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,7 +2,8 @@ name: Building and deploying Springcraft on: release: - types: [published] + types: + - published workflow_dispatch: {} jobs: @@ -15,17 +16,17 @@ jobs: shell: bash -l {0} steps: - - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 with: activate-environment: springcraft-dev auto-update-conda: true - python-version: '3.9' + python-version: "3.13" - name: Installing dependencies run: conda install -c conda-forge poetry - name: Building distributions run: poetry build - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: Springcraft distribution path: dist/* @@ -40,8 +41,8 @@ jobs: shell: bash -l {0} steps: - - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 with: activate-environment: springcraft-dev auto-update-conda: true @@ -54,7 +55,7 @@ jobs: run: sphinx-build ./doc ./build/doc - name: Zipping documentation run: cd ./build; zip -r doc.zip doc; cd .. - - uses: actions/upload-artifact@v2 + - uses: actions/upload-artifact@v4 with: name: Springcraft documentation path: build/doc.zip From fc92ae567e5f5c0aa3400b3b5ca0f12b359387f4 Mon Sep 17 00:00:00 2001 From: JHKru Date: Sun, 13 Jul 2025 20:55:13 +0200 Subject: [PATCH 2/3] Update CI -> Testing; Publish to PyPI, choose Python v. 3.12 --- .github/workflows/deploy.yml | 33 +++++++++++++++++++++++++++++++-- .github/workflows/test.yml | 8 ++++---- 2 files changed, 35 insertions(+), 6 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 70292b7..fd0f246 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,7 +21,7 @@ jobs: with: activate-environment: springcraft-dev auto-update-conda: true - python-version: "3.13" + python-version:"3.12" - name: Installing dependencies run: conda install -c conda-forge poetry - name: Building distributions @@ -46,7 +46,7 @@ jobs: with: activate-environment: springcraft-dev auto-update-conda: true - python-version: '3.9' + python-version:"3.12" environment-file: environment.yml mamba-version: "*" - name: Installing Springcraft @@ -60,3 +60,32 @@ jobs: name: Springcraft documentation path: build/doc.zip if-no-files-found: error + + upload-package: + name: Upload package to GitHub Releases & PyPI + permissions: + contents: write + id-token: write + needs: + - lint + - test + runs-on: ubuntu-latest + environment: + name: publish + url: https://pypi.org/project/springcraft/ + steps: + - uses: actions/download-artifact@v4 + with: + pattern: release-* + merge-multiple: true + path: dist + - name: List distributions to be uploaded + run: ls dist + - name: Upload to GitHub Releases + uses: softprops/action-gh-release@v2.0.5 + if: github.event_name == 'release' && github.event.action == 'published' + with: + files: dist/* + - name: Upload to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + if: github.event_name == 'release' && github.event.action == 'published' \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index ad1dfca..1016f86 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -26,14 +26,14 @@ jobs: shell: bash -l {0} steps: - - uses: actions/checkout@v2 - - uses: conda-incubator/setup-miniconda@v2 + - uses: actions/checkout@v4 + - uses: conda-incubator/setup-miniconda@v3 with: activate-environment: springcraft-dev auto-update-conda: true - python-version: '3.10' + python-version: "3.12" - name: Installing dependencies - run: conda install -c conda-forge poetry pytest + run: conda install -c conda-forge poetry pytest six - name: Building distribution run: poetry build -f wheel - name: Installing distribution From 26e5604fc93a03702e8e25873800373c624a65ff Mon Sep 17 00:00:00 2001 From: JHKru Date: Sun, 13 Jul 2025 23:09:54 +0200 Subject: [PATCH 3/3] Remove unused dependency: six --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1016f86..63955d9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -33,7 +33,7 @@ jobs: auto-update-conda: true python-version: "3.12" - name: Installing dependencies - run: conda install -c conda-forge poetry pytest six + run: conda install -c conda-forge poetry pytest - name: Building distribution run: poetry build -f wheel - name: Installing distribution