Skip to content

Bump version 1.7.4 → 1.7.5 #58

Bump version 1.7.4 → 1.7.5

Bump version 1.7.4 → 1.7.5 #58

name: Test, release and publish
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
steps:
- run: echo "Current ref ${{ github.ref }}"
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip hatch
python -m pip install -e .
install_antlrjar
- name: Test with coverage/unittest
run: |
export ANTLR4_JAR="$GITHUB_WORKSPACE/jars/antlr-4.13.1-complete.jar" && hatch run tests:run
- name: Publish to Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
release:
runs-on: ubuntu-latest
needs: test
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- name: Release
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG.txt
publish:
runs-on: ubuntu-latest
needs: test
if: startsWith(github.ref, 'refs/tags/v')
steps:
- uses: actions/checkout@v3
- name: Install pypa/hatch
run: pip install hatch
- name: Build the binary wheel and source tarball
run: hatch build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@master
with:
password: ${{ secrets.PYPI_API_TOKEN }}