-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore: GitHub workflow to publish pushes on
main
branch to PyPI
- Loading branch information
Showing
4 changed files
with
129 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,124 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
env: | ||
PYTHON_VERSION: '3.11' | ||
|
||
jobs: | ||
integration: | ||
name: Integration | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Checkout | ||
|
||
- uses: actions/setup-python@v5 | ||
name: Setup Python | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
architecture: x64 | ||
|
||
- name: Load cached Poetry installation | ||
id: cached-poetry | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.local | ||
key: poetry-0 | ||
|
||
- name: Install Poetry | ||
if: steps.cached-poetry.outputs.cache-hit != 'true' | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
|
||
- name: Install dependencies | ||
run: poetry install --extras=dev --with dev | ||
|
||
- name: Lint | ||
run: poetry run poe lint | ||
|
||
- name: Create stub files | ||
run: poetry run pyright --createstub kivy | ||
|
||
- name: Type Check | ||
run: poetry run poe typecheck | ||
|
||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
name: Checkout | ||
|
||
- uses: actions/setup-python@v5 | ||
name: Setup Python | ||
with: | ||
python-version: ${{ env.PYTHON_VERSION }} | ||
architecture: x64 | ||
|
||
- name: Load cached Poetry installation | ||
id: cached-poetry | ||
uses: actions/cache@v4 | ||
with: | ||
path: ~/.local | ||
key: poetry-0 | ||
|
||
- name: Install Poetry | ||
if: steps.cached-poetry.outputs.cache-hit != 'true' | ||
uses: snok/install-poetry@v1 | ||
with: | ||
virtualenvs-create: true | ||
|
||
- name: Install dependencies | ||
run: poetry install | ||
|
||
- name: Build | ||
run: poetry build | ||
|
||
- name: Upload wheel | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: wheel | ||
path: dist/*.whl | ||
if-no-files-found: error | ||
|
||
- name: Upload binary | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: binary | ||
path: dist/*.tar.gz | ||
if-no-files-found: error | ||
|
||
pypi-publish: | ||
name: Publish to PyPI | ||
if: >- | ||
github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
needs: | ||
- integration | ||
- build | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: PyPI | ||
url: https://pypi.org/p/ubo-app | ||
permissions: | ||
id-token: write | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: wheel | ||
path: dist | ||
|
||
- uses: actions/download-artifact@v4 | ||
with: | ||
name: binary | ||
path: dist | ||
|
||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
packages-dir: dist | ||
verbose: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "ubo-app" | ||
version = "0.10.0" | ||
version = "0.10.1" | ||
description = "Ubo main app, running on device initialization. A platform for running other apps." | ||
authors = ["Sassan Haradji <[email protected]>"] | ||
license = "Apache-2.0" | ||
|