Skip to content

Commit

Permalink
Merge pull request #15 from fabian-sp/release-action
Browse files Browse the repository at this point in the history
Release action
  • Loading branch information
fabian-sp authored May 15, 2024
2 parents d71d5bc + 860330b commit c059322
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 32 deletions.
49 changes: 49 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build

on:
pull_request:
push:
branches:
- main
tags:
- '*'

jobs:
lint:
name: Lint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.9"
- uses: pre-commit/[email protected]

test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: |
3.12
3.11
3.10
3.9
3.8
- run: pipx install hatch
- run: hatch env create
- run: hatch run test

- name: build
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
run: |
pip install --upgrade build
python -m build
- name: publish
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
32 changes: 0 additions & 32 deletions .github/workflows/unit_tests.yml

This file was deleted.

0 comments on commit c059322

Please sign in to comment.