Skip to content

v2.22.0

v2.22.0 #1228

Workflow file for this run

name: Release
on:
push:
branches: [main]
pull_request:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6
with:
python-version: 3.x
- name: Install dependencies
run: pip install build twine
- name: Build
run: python3 -m build
- name: Check
run: twine check --strict dist/*
- name: Upload packages artifact
if: github.event_name == 'release'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: python-packages
path: dist/
publish:
if: github.event_name == 'release'
needs: [build]
environment:
name: pypi
url: https://pypi.org/p/hcloud
permissions:
id-token: write
runs-on: ubuntu-latest
steps:
- name: Download packages artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: python-packages
path: dist/
- name: Publish packages to PyPI
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0