Skip to content

Commit

Permalink
Merge pull request #12 from graingert/publishing
Browse files Browse the repository at this point in the history
  • Loading branch information
graingert authored Dec 14, 2024
2 parents 51c9b27 + 8b4921f commit 497d2a5
Show file tree
Hide file tree
Showing 4 changed files with 84 additions and 18 deletions.
82 changes: 82 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
name: CI

on:
push:
branches: [default]
tags:
- "**"
pull_request:
workflow_dispatch:

jobs:
typecheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: Install
run: pip install .

- uses: jakebailey/pyright-action@v2
build:
runs-on: ubuntu-latest
timeout-minutes: 30

steps:
- uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.x"

- name: build
run: |
pipx run build
pipx run twine check --strict dist/*
- uses: actions/upload-artifact@v4
if: always()
with:
name: dist
path: dist

pypi-publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
needs:
- build
name: upload release to PyPI
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/download-artifact@v4
with:
name: dist
path: dist

- name: Display structure of downloaded files
run: ls -R

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

check:
if: always()

needs:
- build
- typecheck

runs-on: ubuntu-latest

steps:
- name: Decide whether the needed jobs succeeded or failed
uses: re-actors/alls-green@release/v1
with:
jobs: ${{ toJSON(needs) }}
18 changes: 0 additions & 18 deletions .github/workflows/types.yml

This file was deleted.

1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
backport of asyncio.TaskGroup, asyncio.Runner and asyncio.timeout
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ license = {file = "LICENSE"}
classifiers = ["License :: OSI Approved :: MIT License"]
dynamic = ["version", "description"]
dependencies = ["exceptiongroup", "typing_extensions>=4.12.2,<5"]
readme = "README.md"

[project.urls]
Home = "https://github.com/graingert/taskgroup"

0 comments on commit 497d2a5

Please sign in to comment.