Skip to content

chore(deps): update pypa/gh-action-pypi-publish action to v1.12.2 #235

chore(deps): update pypa/gh-action-pypi-publish action to v1.12.2

chore(deps): update pypa/gh-action-pypi-publish action to v1.12.2 #235

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@v4
- name: Set up Python
uses: actions/setup-python@v5
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@v4
with:
name: python-packages
path: dist/
publish:
if: github.event_name == 'release'
environment:
name: pypi
url: https://pypi.org/p/molecule-hetznercloud
permissions:
id-token: write
runs-on: ubuntu-latest
needs: [build]
steps:
- name: Download packages artifact
uses: actions/download-artifact@v4
with:
name: python-packages
path: dist/
- name: Publish packages to PyPI
uses: pypa/[email protected]