Skip to content

Merge pull request #30 from pmuller/develop #6

Merge pull request #30 from pmuller/develop

Merge pull request #30 from pmuller/develop #6

Workflow file for this run

name: Release
on:
push:
branches:
- main
permissions:
contents: write
jobs:
pypi-publish:
name: PyPI Publish
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: eifinger/setup-rye@v2
with:
enable-cache: true
- run: rye build --clean
- run: rye publish --skip-existing --token ${{ secrets.SALTSTACK_AGE_PYPI_TOKEN }} --yes
tag:
name: Create Git tag
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: |
git config --global user.name 'Github workflow'
git config --global user.email 'pmuller@users.noreply.github.com'
VERSION=$(grep -oP '^version = "\K(\d+\.\d+\.\d+)' pyproject.toml)
if git rev-parse --verify $VERSION >/dev/null 2>&1
then
echo "Tag $VERSION already exists"
exit
fi
git tag $VERSION -a -m "Automatically created"
git push origin $VERSION
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}