Skip to content

Apply regex filter to raw version too #19

Apply regex filter to raw version too

Apply regex filter to raw version too #19

Workflow file for this run

name: Upload Python package
on:
push:
branches: main
tags: '*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install .[test] build
- name: Run tests
run: python -m pytest
- name: Build package
run: python -m build
- name: Upload package artifact
uses: actions/upload-artifact@v3
with:
name: python-build
path: dist
publish:
runs-on: ubuntu-latest
needs: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
environment:
name: pypi
url: https://pypi.org/p/hatch-gradle-version
permissions:
id-token: write
steps:
- name: Download package artifact
uses: actions/download-artifact@v3
with:
name: python-build
path: dist
- name: Publish package
uses: pypa/gh-action-pypi-publish@release/v1