Skip to content

Dependency updates

Dependency updates #3

Workflow file for this run

name: Release and Test Build
on:
release:
types: [published]
push:
branches:
- master
permissions:
contents: read
jobs:
build:
name: Build package
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'
- name: Set version from release tag
if: github.event_name == 'release'
run: |
TAG="${{ github.event.release.tag_name }}"
VERSION="${TAG#v}"
echo "__version__ = \"${VERSION}\"" > nuvolos/version.py
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build
- name: Build sdist and wheel
run: python -m build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish-pypi:
name: Publish to PyPI
needs: build
if: github.event_name == 'release' && github.event.action == 'published'
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
publish-testpypi:
name: Publish to TestPyPI
needs: build
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: dist/
- name: Publish to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/