Skip to content

v6.0.0

v6.0.0 #17

Workflow file for this run

name: 'Linuxfabrik: Publish to PyPI'
on:
release:
types:
- 'published'
permissions:
contents: 'read'
jobs:
build:
name: 'Build package'
runs-on: 'ubuntu-latest'
steps:
- name: 'Checkout repository'
uses: 'actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0' # v7.0.0
- name: 'Set up Python'
uses: 'actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1' # v6.3.0
with:
python-version: '3.12'
- name: 'Install build tools'
run: 'pip install build==1.4.2'
- name: 'Build package'
run: 'python -m build'
- name: 'Upload build artifacts'
uses: 'actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a' # v7.0.1
with:
name: 'dist'
path: 'dist/'
publish-testpypi:
name: 'Publish to TestPyPI'
needs: 'build'
runs-on: 'ubuntu-latest'
environment:
name: 'testpypi'
url: 'https://test.pypi.org/project/linuxfabrik-lib/'
permissions:
id-token: 'write'
steps:
- name: 'Download build artifacts'
uses: 'actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c' # v8.0.1
with:
name: 'dist'
path: 'dist/'
- name: 'Publish to TestPyPI'
uses: 'pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b' # v1.14.0
with:
repository-url: 'https://test.pypi.org/legacy/'
publish-pypi:
name: 'Publish to PyPI'
needs: 'publish-testpypi'
runs-on: 'ubuntu-latest'
environment:
name: 'pypi'
url: 'https://pypi.org/project/linuxfabrik-lib/'
permissions:
id-token: 'write'
steps:
- name: 'Download build artifacts'
uses: 'actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c' # v8.0.1
with:
name: 'dist'
path: 'dist/'
- name: 'Publish to PyPI'
uses: 'pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b' # v1.14.0