From 3f80afe298067b894ddae4ff898af39b4299d039 Mon Sep 17 00:00:00 2001 From: fabiobarkoski Date: Thu, 25 Jan 2024 13:47:46 -0300 Subject: [PATCH 1/4] wip --- upcli/pyproject.toml | 24 ++++++++++++++++++++++-- uplib/pyproject.toml | 3 +++ 2 files changed, 25 insertions(+), 2 deletions(-) diff --git a/upcli/pyproject.toml b/upcli/pyproject.toml index 08bb16e..987342e 100644 --- a/upcli/pyproject.toml +++ b/upcli/pyproject.toml @@ -1,13 +1,33 @@ [tool.poetry] name = "up" version = "0.2.19" -description = "" +description = "Unified and Pluggable CLI" authors = ["Julio Faerman "] +maintainers = ["Julio Faerman "] readme = "README.md" +license = "MIT" +homepage = "https://github.com/CaravanaCloud/up" +repository = "https://github.com/CaravanaCloud/up" +documentation = "https://github.com/CaravanaCloud/up#documentation" +keywords = ["CLI"] +classifiers = [ + "Intended Audience :: System Administrators", + "Intended Audience :: Developers", + "Natural Language :: English", + "Operating System :: OS Independent", + "Programming Language :: Python", + "Programming Language :: Python :: 3 :: Only", + "Programming Language :: Python :: 3.12", + "License :: OSI Approved :: MIT License", + "Topic :: Utilities" +] #packages = [ # { include = "up_cli", from="./up_cli/"} #] +[tool.poetry.urls] +"Bug Tracker" = "https://github.com/CaravanaCloud/up/issues" + [tool.poetry.dependencies] python = "^3.12" uplib = "^0.2.19" @@ -22,4 +42,4 @@ requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" [tool.poetry.scripts] -up = "up.main:cli_main" \ No newline at end of file +up = "up.main:cli_main" diff --git a/uplib/pyproject.toml b/uplib/pyproject.toml index f2bc37c..e3e6a2b 100644 --- a/uplib/pyproject.toml +++ b/uplib/pyproject.toml @@ -3,6 +3,9 @@ name = "uplib" version = "0.2.19" description = "" authors = ["Julio Faerman <356476+faermanj@users.noreply.github.com>"] +include = [ + "up.yaml" +] [tool.poetry.dependencies] python = "^3.12" From 67cbc601f03dab4e2c233cb4865fd3d0ee67c89b Mon Sep 17 00:00:00 2001 From: fabiobarkoski Date: Fri, 26 Jan 2024 02:33:18 -0300 Subject: [PATCH 2/4] wip --- .github/workflows/build.yml | 94 +++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..26e096c --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,94 @@ +name: Build and publish packages + +on: + push: + tags: + - '*' + +jobs: + linux: + name: "building ${{ matrix.package }} to ${{ matrix.platform }}" + runs-on: ubuntu-latest + env: + CIBW_BUILD: "cp312*-${{ matrix.platform }}" + strategy: + matrix: + platform: [manylinux_x86_64, musllinux_x86_64] + package: [upcli, uplib] + steps: + - uses: actions/checkout@v4 + + - name: Enter ${{ matrix.package }} dir + uses: cd ${{ matrix.package }} + + - name: Build wheel + uses: pypa/cibuildwheel@v2.16.2 + + - uses: actions/upload-artifact@v4 + with: + path: ./wheelhouse/*.whl + + windows: + name: "building ${{ matrix.package }} to ${{ matrix.platform }}" + runs-on: windows-latest + env: + CIBW_BUILD: "cp312*-${{ matrix.platform }}" + strategy: + matrix: + platform: [cp312-win_amd64] + package: [upcli, uplib] + steps: + - uses: actions/checkout@v4 + + - name: Enter ${{ matrix.package }} dir + uses: cd ${{ matrix.package }} + + - name: Build wheel + uses: pypa/cibuildwheel@v2.16.2 + + - uses: actions/upload-artifact@v4 + with: + path: ./wheelhouse/*.whl + + macos: + name: "building ${{ matrix.package }} to ${{ matrix.platform }}" + runs-on: macos-latest + env: + CIBW_BUILD: "cp312*-${{ matrix.platform }}" + strategy: + matrix: + platform: [macosx_arm64, macosx_x86_64] + package: [upcli, uplib] + steps: + - uses: actions/checkout@v4 + + - name: Enter ${{ matrix.package }} dir + uses: cd ${{ matrix.package }} + + - name: Build wheel + uses: pypa/cibuildwheel@v2.16.2 + + - uses: actions/upload-artifact@v4 + with: + path: ./wheelhouse/*.whl + + publish: + needs: [linux, macos, windows] + runs-on: ubuntu-latest + strategy: + matrix: + python-version: "3.12" + steps: + - uses: actions/checkout@v4 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Poetry + uses: snok/install-poetry@v1 + + - name: Publish packages + uses: poetry publish -C=./wheelhouse + From d33f8c8f32d578ccbe777624b6e0724467c0d135 Mon Sep 17 00:00:00 2001 From: fabiobarkoski Date: Fri, 26 Jan 2024 02:48:35 -0300 Subject: [PATCH 3/4] wip --- .github/workflows/build.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 26e096c..2067979 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,6 +1,7 @@ name: Build and publish packages on: + workflow_dispatch: push: tags: - '*' From 6b25d501ba11c8b77ee3eb2914bc5b55eace7854 Mon Sep 17 00:00:00 2001 From: fabiobarkoski Date: Fri, 26 Jan 2024 11:28:35 -0300 Subject: [PATCH 4/4] wip --- .github/workflows/build.yml | 91 +++++++++++-------------------------- 1 file changed, 27 insertions(+), 64 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2067979..26252c3 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -7,89 +7,52 @@ on: - '*' jobs: - linux: - name: "building ${{ matrix.package }} to ${{ matrix.platform }}" + publish: runs-on: ubuntu-latest - env: - CIBW_BUILD: "cp312*-${{ matrix.platform }}" + environment: + name: pypi + url: https://pypi.org/p/ strategy: matrix: - platform: [manylinux_x86_64, musllinux_x86_64] package: [upcli, uplib] + permissions: + id-token: write steps: - uses: actions/checkout@v4 - - name: Enter ${{ matrix.package }} dir - uses: cd ${{ matrix.package }} - - - name: Build wheel - uses: pypa/cibuildwheel@v2.16.2 - - - uses: actions/upload-artifact@v4 + - uses: actions/setup-python@v5 with: - path: ./wheelhouse/*.whl + python-version: '3.12' - windows: - name: "building ${{ matrix.package }} to ${{ matrix.platform }}" - runs-on: windows-latest - env: - CIBW_BUILD: "cp312*-${{ matrix.platform }}" - strategy: - matrix: - platform: [cp312-win_amd64] - package: [upcli, uplib] - steps: - - uses: actions/checkout@v4 - - - name: Enter ${{ matrix.package }} dir - uses: cd ${{ matrix.package }} + - run: pip install build - - name: Build wheel - uses: pypa/cibuildwheel@v2.16.2 + - name: build ${{ matrix.package }} + run: | + cd {{ matrix.package }} + python -m build - uses: actions/upload-artifact@v4 with: - path: ./wheelhouse/*.whl + path: ./${{ matrix.package }}/dist/* - macos: - name: "building ${{ matrix.package }} to ${{ matrix.platform }}" - runs-on: macos-latest - env: - CIBW_BUILD: "cp312*-${{ matrix.platform }}" - strategy: - matrix: - platform: [macosx_arm64, macosx_x86_64] - package: [upcli, uplib] - steps: - - uses: actions/checkout@v4 - - - name: Enter ${{ matrix.package }} dir - uses: cd ${{ matrix.package }} - - - name: Build wheel - uses: pypa/cibuildwheel@v2.16.2 - - - uses: actions/upload-artifact@v4 - with: - path: ./wheelhouse/*.whl + - name: Publish packages to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 - publish: - needs: [linux, macos, windows] + release: + needs: [publish] runs-on: ubuntu-latest - strategy: - matrix: - python-version: "3.12" steps: - uses: actions/checkout@v4 - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v4 + - uses: actions/download-artifact@v4 with: - python-version: ${{ matrix.python-version }} - - - name: Install Poetry - uses: snok/install-poetry@v1 + #pattern: *.whl + merge-multiple: true + path: dist - - name: Publish packages - uses: poetry publish -C=./wheelhouse + - name: Create release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: dist/