tag #8
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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: debug | |
run: | | |
set -ex | |
pwd | |
git describe | |
git show | |
git show 0.31.0 | |
- name: Create GitHub release | |
uses: cockpit-project/action-release@debug | |
with: | |
filename: "dist/python-dbusmock-${{ github.ref_name }}.tar.gz" | |
- name: Create PyPy release | |
uses: pypa/gh-action-pypi-publish@release/v1 |