Skip to content

fmf: Strengthen integration test #53

fmf: Strengthen integration test

fmf: Strengthen integration test #53

Workflow file for this run

name: tag
on:
push:
tags:
# this is a glob, not a regexp
- '[0-9]*'
jobs:
release:
runs-on: ubuntu-22.04
environment: release
permissions:
# PyPI trusted publisher
id-token: write
# create release
contents: write
steps:
- name: Clone repository
uses: actions/checkout@v4
with:
# need this to also fetch tags
fetch-depth: 0
- name: Workaround for https://github.com/actions/checkout/pull/697
run: git fetch --force origin $(git describe --tags):refs/tags/$(git describe --tags)
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y python3-setuptools python3-setuptools-scm python3-dbus
dpkg -l
- name: Build release tarball
run: ./setup.py sdist
- name: Sanity check
run: |
set -eux
mkdir tmp
cd tmp
tar xf ../dist/python-dbusmock-${{ github.ref_name }}.tar.gz
cd python-dbusmock-*
test "$(PYTHONPATH=. python3 -c 'import dbusmock; print(dbusmock.__version__)')" = "${{ github.ref_name }}"
PYTHONPATH=. python3 tests/test_api.py
cd ../..
rm -rf tmp
- name: Create GitHub release
uses: cockpit-project/action-release@7d2e2657382e8d34f88a24b5987f2b81ea165785
with:
filename: "dist/python-dbusmock-${{ github.ref_name }}.tar.gz"
- name: Create PyPy release
uses: pypa/gh-action-pypi-publish@release/v1