Improved workflows

This commit is contained in:
2025-05-23 13:01:56 +01:00
parent 31bf58574f
commit 62ecc4e986
3 changed files with 51 additions and 6 deletions

26
.github/workflows/publish.yml vendored Normal file
View File

@@ -0,0 +1,26 @@
name: Publish to PyPI
on:
workflow_run:
workflows:
- Auto Version Tag
types:
- completed
jobs:
publish:
runs-on: ubuntu-latest
environment: release
steps:
- uses: actions/checkout@v4
- name: Set up uv
uses: astral-sh/setup-uv@v6
with:
python-version: "${{ matrix.python-version }}"
enable-cache: true
cache-dependency-glob: |
pyproject.toml
- name: Build package
run: uv build
- name: Publish to PyPI
run: uv publish --token ${{ secrets.PYPI_API_TOKEN }}

20
.github/workflows/tagging.yml vendored Normal file
View File

@@ -0,0 +1,20 @@
name: Auto Version Tag
on:
workflow_run:
workflows:
- Tests
types:
- completed
jobs:
tag:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Version tag
uses: Jorricks/action-python-autotagging@1.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
path: invenio_theme_iform/__about__.py
variable: __version__

View File

@@ -6,16 +6,15 @@
# modify it under the terms of the MIT License; see LICENSE file for more
# details.
name: CI
name: Tests
on:
push:
branches: master
branches:
- master
pull_request:
branches: master
schedule:
# * is a special character in YAML so you have to quote this string
- cron: "0 3 * * 6"
branches:
- master
workflow_dispatch:
inputs:
reason: