Skip to content

chore(deps): update github actions (#677) #1270

chore(deps): update github actions (#677)

chore(deps): update github actions (#677) #1270

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@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
- name: Set up Python
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7
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@dc37677b2e1c63e2034f94d8a5b11f265b73ba33 # v1.14.2