From 05cff575fd2625f1ba3a67d48c0dccb4830e714c Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve <32897170+wgilder@users.noreply.github.com> Date: Sat, 30 Sep 2023 14:24:05 +0200 Subject: [PATCH 01/16] Create publish-apishell.yml --- .github/workflows/publish-apishell.yml | 62 ++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/publish-apishell.yml diff --git a/.github/workflows/publish-apishell.yml b/.github/workflows/publish-apishell.yml new file mode 100644 index 0000000..3696fca --- /dev/null +++ b/.github/workflows/publish-apishell.yml @@ -0,0 +1,62 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + build: + name: Build distribution + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + - name: Build a binary wheel and source tarball + run: python3 -m build Integrations/ApiShell/ + - name: Store the distribution packages + uses: actions/upload-artifact@v3 + with: + name: python-package-distributions + path: Integrations/ApiShell/dist/ + + publish-to-testpypi: + name: Publish Python distro to TestPyPi + needs: + - build + runs-on: ubuntu-latest + + environment: + name: testpypi + url: https://test.pypi.org/project/iriusrisk-apishell-v1/ + + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: Integrations/ApiShell/dist/ + - name: Publish distribution to TestPyPi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/simple/ From ed88e8edd95a58b054ff95e77ba6eac93919312f Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve <32897170+wgilder@users.noreply.github.com> Date: Sat, 30 Sep 2023 14:25:46 +0200 Subject: [PATCH 02/16] Update publish-apishell.yml --- .github/workflows/publish-apishell.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish-apishell.yml b/.github/workflows/publish-apishell.yml index 3696fca..cbe617a 100644 --- a/.github/workflows/publish-apishell.yml +++ b/.github/workflows/publish-apishell.yml @@ -60,3 +60,5 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/simple/ + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} From 9d8079926b176563b0c9492560c7465432b7f929 Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve Date: Sat, 30 Sep 2023 14:36:24 +0200 Subject: [PATCH 03/16] added dist file --- Integrations/ApiShell/pyproject.toml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Integrations/ApiShell/pyproject.toml diff --git a/Integrations/ApiShell/pyproject.toml b/Integrations/ApiShell/pyproject.toml new file mode 100644 index 0000000..3156410 --- /dev/null +++ b/Integrations/ApiShell/pyproject.toml @@ -0,0 +1,25 @@ +[build-system] +requires = ["pdm-backend"] +build-backend = "pdm.backend" + +[tool.pdm.build] +includes=["iriusrisk/"] + +[project] +name = "iriusrisk_apishell_v1" +version = "0.1.5" +authors = [ + { name="Walter Gildersleeve", email="wgildersleeve@iriusrisk.com"}, +] +description = "Aids calling IriusRisk v1 APIs. Starting point when creating more complex scripts that create, call and process API calls." +readme = "README.md" +requires-python = ">=3.7" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] + +[project.urls] +"Homepage" = "https://github.com/iriusrisk/IriusRisk-Central/tree/main/Integrations/ApiShell" +"Bug Tracker" = "https://github.com/iriusrisk/IriusRisk-Central/issues" From 3e305320713c4520b8c1430f4856a0a0e9e2c149 Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve <32897170+wgilder@users.noreply.github.com> Date: Sat, 30 Sep 2023 14:38:13 +0200 Subject: [PATCH 04/16] Update pyproject.toml --- Integrations/ApiShell/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Integrations/ApiShell/pyproject.toml b/Integrations/ApiShell/pyproject.toml index 3156410..e0bbab2 100644 --- a/Integrations/ApiShell/pyproject.toml +++ b/Integrations/ApiShell/pyproject.toml @@ -7,7 +7,7 @@ includes=["iriusrisk/"] [project] name = "iriusrisk_apishell_v1" -version = "0.1.5" +version = "0.1.6" authors = [ { name="Walter Gildersleeve", email="wgildersleeve@iriusrisk.com"}, ] From 64a372363241167135f49359644f8f04158d2dfc Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve <32897170+wgilder@users.noreply.github.com> Date: Sat, 30 Sep 2023 14:50:30 +0200 Subject: [PATCH 05/16] fixed output dir --- .github/workflows/publish-apishell.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish-apishell.yml b/.github/workflows/publish-apishell.yml index cbe617a..fe256f1 100644 --- a/.github/workflows/publish-apishell.yml +++ b/.github/workflows/publish-apishell.yml @@ -33,12 +33,12 @@ jobs: build --user - name: Build a binary wheel and source tarball - run: python3 -m build Integrations/ApiShell/ + run: python3 -m build Integrations/ApiShell/ -outdir dist/ - name: Store the distribution packages uses: actions/upload-artifact@v3 with: name: python-package-distributions - path: Integrations/ApiShell/dist/ + path: dist/ publish-to-testpypi: name: Publish Python distro to TestPyPi @@ -55,7 +55,7 @@ jobs: uses: actions/download-artifact@v3 with: name: python-package-distributions - path: Integrations/ApiShell/dist/ + path: dist/ - name: Publish distribution to TestPyPi uses: pypa/gh-action-pypi-publish@release/v1 with: From 9e75eda21fe0ffd0324426366243e4b7dfaa5d1a Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve <32897170+wgilder@users.noreply.github.com> Date: Sat, 30 Sep 2023 14:52:23 +0200 Subject: [PATCH 06/16] small fix --- .github/workflows/publish-apishell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-apishell.yml b/.github/workflows/publish-apishell.yml index fe256f1..f5a5bb2 100644 --- a/.github/workflows/publish-apishell.yml +++ b/.github/workflows/publish-apishell.yml @@ -33,7 +33,7 @@ jobs: build --user - name: Build a binary wheel and source tarball - run: python3 -m build Integrations/ApiShell/ -outdir dist/ + run: python3 -m build Integrations/ApiShell/ --outdir dist - name: Store the distribution packages uses: actions/upload-artifact@v3 with: From 8f94485ebbeeef645b53c754bfbe00d55378e2f7 Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve <32897170+wgilder@users.noreply.github.com> Date: Sat, 30 Sep 2023 14:55:52 +0200 Subject: [PATCH 07/16] fixed PyPi URL --- .github/workflows/publish-apishell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-apishell.yml b/.github/workflows/publish-apishell.yml index f5a5bb2..2ef13d3 100644 --- a/.github/workflows/publish-apishell.yml +++ b/.github/workflows/publish-apishell.yml @@ -59,6 +59,6 @@ jobs: - name: Publish distribution to TestPyPi uses: pypa/gh-action-pypi-publish@release/v1 with: - repository-url: https://test.pypi.org/simple/ + repository-url: https://test.pypi.org/legacy/ user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} From 34aa89a69443d8b2e181e9cad6e9b080fc847775 Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve <32897170+wgilder@users.noreply.github.com> Date: Sat, 30 Sep 2023 14:24:05 +0200 Subject: [PATCH 08/16] Create publish-apishell.yml --- .github/workflows/publish-apishell.yml | 62 ++++++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 .github/workflows/publish-apishell.yml diff --git a/.github/workflows/publish-apishell.yml b/.github/workflows/publish-apishell.yml new file mode 100644 index 0000000..3696fca --- /dev/null +++ b/.github/workflows/publish-apishell.yml @@ -0,0 +1,62 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package + +on: + release: + types: [published] + +permissions: + contents: read + +jobs: + build: + name: Build distribution + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + - name: Build a binary wheel and source tarball + run: python3 -m build Integrations/ApiShell/ + - name: Store the distribution packages + uses: actions/upload-artifact@v3 + with: + name: python-package-distributions + path: Integrations/ApiShell/dist/ + + publish-to-testpypi: + name: Publish Python distro to TestPyPi + needs: + - build + runs-on: ubuntu-latest + + environment: + name: testpypi + url: https://test.pypi.org/project/iriusrisk-apishell-v1/ + + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: Integrations/ApiShell/dist/ + - name: Publish distribution to TestPyPi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/simple/ From 8eed4f53d8125528153a4d7a22a4968a26ef8838 Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve <32897170+wgilder@users.noreply.github.com> Date: Sat, 30 Sep 2023 14:25:46 +0200 Subject: [PATCH 09/16] Update publish-apishell.yml --- .github/workflows/publish-apishell.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/publish-apishell.yml b/.github/workflows/publish-apishell.yml index 3696fca..cbe617a 100644 --- a/.github/workflows/publish-apishell.yml +++ b/.github/workflows/publish-apishell.yml @@ -60,3 +60,5 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/simple/ + user: __token__ + password: ${{ secrets.PYPI_API_TOKEN }} From 85372ce10fd1792acac911e5ab8f8aea9c8d1315 Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve Date: Sat, 30 Sep 2023 14:36:24 +0200 Subject: [PATCH 10/16] added dist file --- Integrations/ApiShell/pyproject.toml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 Integrations/ApiShell/pyproject.toml diff --git a/Integrations/ApiShell/pyproject.toml b/Integrations/ApiShell/pyproject.toml new file mode 100644 index 0000000..3156410 --- /dev/null +++ b/Integrations/ApiShell/pyproject.toml @@ -0,0 +1,25 @@ +[build-system] +requires = ["pdm-backend"] +build-backend = "pdm.backend" + +[tool.pdm.build] +includes=["iriusrisk/"] + +[project] +name = "iriusrisk_apishell_v1" +version = "0.1.5" +authors = [ + { name="Walter Gildersleeve", email="wgildersleeve@iriusrisk.com"}, +] +description = "Aids calling IriusRisk v1 APIs. Starting point when creating more complex scripts that create, call and process API calls." +readme = "README.md" +requires-python = ">=3.7" +classifiers = [ + "Programming Language :: Python :: 3", + "License :: OSI Approved :: MIT License", + "Operating System :: OS Independent", +] + +[project.urls] +"Homepage" = "https://github.com/iriusrisk/IriusRisk-Central/tree/main/Integrations/ApiShell" +"Bug Tracker" = "https://github.com/iriusrisk/IriusRisk-Central/issues" From ca1bafae6cdbd55c65899e6a4f356c17f1fc9d9c Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve Date: Sat, 30 Sep 2023 18:08:02 +0200 Subject: [PATCH 11/16] resolved conflict --- .github/workflows/publish-apishell.yml | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/.github/workflows/publish-apishell.yml b/.github/workflows/publish-apishell.yml index 531535b..2ef13d3 100644 --- a/.github/workflows/publish-apishell.yml +++ b/.github/workflows/publish-apishell.yml @@ -33,20 +33,12 @@ jobs: build --user - name: Build a binary wheel and source tarball -<<<<<<< HEAD - run: python3 -m build Integrations/ApiShell/ -======= run: python3 -m build Integrations/ApiShell/ --outdir dist ->>>>>>> 8f94485ebbeeef645b53c754bfbe00d55378e2f7 - name: Store the distribution packages uses: actions/upload-artifact@v3 with: name: python-package-distributions -<<<<<<< HEAD - path: Integrations/ApiShell/dist/ -======= path: dist/ ->>>>>>> 8f94485ebbeeef645b53c754bfbe00d55378e2f7 publish-to-testpypi: name: Publish Python distro to TestPyPi @@ -63,18 +55,10 @@ jobs: uses: actions/download-artifact@v3 with: name: python-package-distributions -<<<<<<< HEAD - path: Integrations/ApiShell/dist/ - - name: Publish distribution to TestPyPi - uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/simple/ -======= path: dist/ - name: Publish distribution to TestPyPi uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ ->>>>>>> 8f94485ebbeeef645b53c754bfbe00d55378e2f7 user: __token__ password: ${{ secrets.PYPI_API_TOKEN }} From c8a9af19e3897b28c9d1a4cc01b4c591f2616896 Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve Date: Sat, 30 Sep 2023 19:19:47 +0200 Subject: [PATCH 12/16] adding trusted publishing --- .github/workflows/publish-apishell.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/publish-apishell.yml b/.github/workflows/publish-apishell.yml index 2ef13d3..e71a291 100644 --- a/.github/workflows/publish-apishell.yml +++ b/.github/workflows/publish-apishell.yml @@ -49,6 +49,8 @@ jobs: environment: name: testpypi url: https://test.pypi.org/project/iriusrisk-apishell-v1/ + permissions: + id-token: write steps: - name: Download all the dists @@ -60,5 +62,4 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ - user: __token__ - password: ${{ secrets.PYPI_API_TOKEN }} + From e58075db3b85b1ce41b9f60fb0c5f68b89441771 Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve Date: Sat, 30 Sep 2023 19:30:15 +0200 Subject: [PATCH 13/16] minor changes --- .github/workflows/publish-apishell.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/publish-apishell.yml b/.github/workflows/publish-apishell.yml index e71a291..1a76312 100644 --- a/.github/workflows/publish-apishell.yml +++ b/.github/workflows/publish-apishell.yml @@ -49,6 +49,7 @@ jobs: environment: name: testpypi url: https://test.pypi.org/project/iriusrisk-apishell-v1/ + permissions: id-token: write @@ -62,4 +63,3 @@ jobs: uses: pypa/gh-action-pypi-publish@release/v1 with: repository-url: https://test.pypi.org/legacy/ - From 6b3ab13ceff4155d1e23525e8792aaa43a6e3365 Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve Date: Sat, 30 Sep 2023 19:33:45 +0200 Subject: [PATCH 14/16] bumped version --- Integrations/ApiShell/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Integrations/ApiShell/pyproject.toml b/Integrations/ApiShell/pyproject.toml index e0bbab2..e4d5daa 100644 --- a/Integrations/ApiShell/pyproject.toml +++ b/Integrations/ApiShell/pyproject.toml @@ -7,7 +7,7 @@ includes=["iriusrisk/"] [project] name = "iriusrisk_apishell_v1" -version = "0.1.6" +version = "0.1.7" authors = [ { name="Walter Gildersleeve", email="wgildersleeve@iriusrisk.com"}, ] From b11d738df8154e4d2d207c19250d7ce12eb3de02 Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve Date: Sat, 30 Sep 2023 19:54:24 +0200 Subject: [PATCH 15/16] split releases into test and actual --- .github/workflows/publish-apishell.yml | 13 ++--- .github/workflows/publish-test-apishell.yml | 65 +++++++++++++++++++++ 2 files changed, 70 insertions(+), 8 deletions(-) create mode 100644 .github/workflows/publish-test-apishell.yml diff --git a/.github/workflows/publish-apishell.yml b/.github/workflows/publish-apishell.yml index 1a76312..b798254 100644 --- a/.github/workflows/publish-apishell.yml +++ b/.github/workflows/publish-apishell.yml @@ -6,7 +6,7 @@ # separate terms of service, privacy policy, and support # documentation. -name: Upload Python Package +name: Upload Python Package to PyPi on: release: @@ -40,15 +40,14 @@ jobs: name: python-package-distributions path: dist/ - publish-to-testpypi: - name: Publish Python distro to TestPyPi + publish-to-pypi: + name: Publish Python distro to PyPi needs: - build runs-on: ubuntu-latest environment: - name: testpypi - url: https://test.pypi.org/project/iriusrisk-apishell-v1/ + name: pypi permissions: id-token: write @@ -59,7 +58,5 @@ jobs: with: name: python-package-distributions path: dist/ - - name: Publish distribution to TestPyPi + - name: Publish distribution to PyPi uses: pypa/gh-action-pypi-publish@release/v1 - with: - repository-url: https://test.pypi.org/legacy/ diff --git a/.github/workflows/publish-test-apishell.yml b/.github/workflows/publish-test-apishell.yml new file mode 100644 index 0000000..b2d3bbc --- /dev/null +++ b/.github/workflows/publish-test-apishell.yml @@ -0,0 +1,65 @@ +# This workflow will upload a Python Package using Twine when a release is created +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries + +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. + +name: Upload Python Package to Test PyPi + +on: + release: + types: [prepublished] + +permissions: + contents: read + +jobs: + build: + name: Build distribution + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.x" + - name: Install pypa/build + run: >- + python3 -m + pip install + build + --user + - name: Build a binary wheel and source tarball + run: python3 -m build Integrations/ApiShell/ --outdir dist + - name: Store the distribution packages + uses: actions/upload-artifact@v3 + with: + name: python-package-distributions + path: dist/ + + publish-to-testpypi: + name: Publish Python distro to TestPyPi + needs: + - build + runs-on: ubuntu-latest + + environment: + name: testpypi + url: https://test.pypi.org/project/iriusrisk-apishell-v1/ + + permissions: + id-token: write + + steps: + - name: Download all the dists + uses: actions/download-artifact@v3 + with: + name: python-package-distributions + path: dist/ + - name: Publish distribution to TestPyPi + uses: pypa/gh-action-pypi-publish@release/v1 + with: + repository-url: https://test.pypi.org/legacy/ From 5ff82ef6a35942ec87f62f3bf6d5859f1d882475 Mon Sep 17 00:00:00 2001 From: Walter Gildersleeve Date: Sat, 30 Sep 2023 19:54:55 +0200 Subject: [PATCH 16/16] creating release version --- Integrations/ApiShell/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Integrations/ApiShell/pyproject.toml b/Integrations/ApiShell/pyproject.toml index e4d5daa..327df35 100644 --- a/Integrations/ApiShell/pyproject.toml +++ b/Integrations/ApiShell/pyproject.toml @@ -7,7 +7,7 @@ includes=["iriusrisk/"] [project] name = "iriusrisk_apishell_v1" -version = "0.1.7" +version = "0.2.0" authors = [ { name="Walter Gildersleeve", email="wgildersleeve@iriusrisk.com"}, ]