https://github.com/vejnar/LabxPipe
Tip revision: a4f21621fde5cc76993d75055903af32e05b8d87 authored by vejnar on 23 November 2022, 19:48:49 UTC
Add demultiplex command
Add demultiplex command
Tip revision: a4f2162
arch.yml
image: archlinux
oauth: git.sr.ht/OBJECTS:RW git.sr.ht/REPOSITORIES:RO git.sr.ht/PROFILE:RO
sources:
- git@git.sr.ht:~vejnar/LabxPipe
environment:
repo: LabxPipe
packages: hut python-build twine
secrets:
- 0fa4be0f-f0ac-4763-855d-51d208629cfe # PyPI token
tasks:
- update: |
sudo pacman -Sy --noconfirm --noprogressbar archlinux-keyring
sudo pacman -Syu --noconfirm --noprogressbar $packages
- archive-tag: |
cd $repo
tag=$(git describe --exact-match 2>/dev/null || true)
if [ -z "$tag" ]; then
echo "Current commit is not a tag; abort task"
exit 0
fi
# Publish archive
version=$(echo "$tag" | tr -d 'v')
git archive "v$version" -o "$repo-$version.tar.gz"
hut git artifact upload --rev "$tag" "$repo-$version.tar.gz"
- pypi-tag: |
cd $repo
tag=$(git describe --exact-match 2>/dev/null || true)
if [ -z "$tag" ]; then
echo "Current commit is not a tag; abort task"
exit 0
fi
# Publish to PyPI
set +x
python3 -m build --sdist
TWINE_USERNAME="__token__" \
TWINE_PASSWORD="$(cat ~/.pypi_token)" \
twine upload dist/*tar.gz
set -x