-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This PR is for testing purposes only and should not be merged into main.
- Loading branch information
Showing
1 changed file
with
51 additions
and
0 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,51 @@ | ||
name: Build and Publish to test PyPi | ||
on: push | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install Poetry | ||
uses: abatilo/actions-poetry@v2 | ||
with: | ||
poetry-version: 1.7.1 | ||
- uses: actions/cache@v3 | ||
name: Define a cache for the virtual environment based on the dependencies lock file | ||
with: | ||
path: ./.venv | ||
key: venv-${{ hashFiles('poetry.lock') }} | ||
- name: Install the project dependencies | ||
run: poetry install | ||
- name: Build Packages | ||
run: poetry install | ||
- name: Build Python packages | ||
run: poetry build | ||
- name: Store the distribution packages | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
publish-pypi: | ||
environment: | ||
name: test-release | ||
url: https://test.pypi.org/p/sensirion-uart-scc1 | ||
permissions: | ||
id-token: write | ||
runs-on: ubuntu-22.04 | ||
needs: | ||
- build | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Download artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: python-package-distributions | ||
path: dist/ | ||
- name: Publish package distributions to PyPI | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
repository-url: https://test.pypi.org/legacy/ |