Skip to content

Release

Release #2

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: read
jobs:
build-package:
name: Build Package
runs-on: ubuntu-24.04
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup python
id: setup-python
uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Setup build
run: pip install build
- name: Build packages
run: python -m build
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: packages
path: dist
if-no-files-found: error
github-release:
name: Release on GitHub
needs: build-package
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: packages
path: dist
- name: Make release
uses: softprops/action-gh-release@v2
with:
files: |
dist/*.tar.gz
dist/*.whl
fail_on_unmatched_files: true
pypi-publish:
name: Publish on PyPI
needs: github-release
runs-on: ubuntu-24.04
environment:
name: pypi
url: https://pypi.org/p/pytest-moto-fixtures
permissions:
id-token: write
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: packages
path: dist
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1