Skip to content

Rewrite stream announcer in nim #128

Rewrite stream announcer in nim

Rewrite stream announcer in nim #128

name: publish_burny_common
on:
push:
paths:
- burny_common/**
- .github/workflows/publish_burny_common.yml
pull_request:
branches:
- master
- develop
env:
SUBDIRECTORY: burny_common
jobs:
run_code_check:
name: run_code_check_py${{ matrix.python-version }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.9", "3.10", "3.11", "3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
# In conflict with pyre-check
# - name: Set up Python ${{ matrix.python-version }}
# uses: actions/setup-python@v4
# with:
# python-version: ${{ matrix.python-version }}
#
# - name: Cache .venv
# uses: actions/cache@v3
# with:
# path: .venv
# key: ${{ env.SUBDIRECTORY }}-${{ matrix.os }}-${{ steps.setup-python.outputs.python-version }}-poetry-${{ hashFiles('poetry.lock') }}
# https://earthly.dev/get-earthly
- name: Install Earthly
run: sudo /bin/sh -c 'wget https://github.com/earthly/earthly/releases/latest/download/earthly-linux-amd64 -O /usr/local/bin/earthly && chmod +x /usr/local/bin/earthly && /usr/local/bin/earthly bootstrap --with-autocomplete'
- name: Install
working-directory: ${{ env.SUBDIRECTORY }}
run: earthly +install-dev --verbose true --PYTHONVERSION=${{ matrix.python-version }}
- name: Run code checks and tests
working-directory: ${{ env.SUBDIRECTORY }}
run: earthly +all --verbose true --PYTHONVERSION=${{ matrix.python-version }}
# - name: Save cache
# working-directory: ${{ env.SUBDIRECTORY }}
# run: earthly +export-cache --verbose true --PYTHONVERSION=${{ matrix.python-version }}
build_and_publish:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ["3.12"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
run: pip install uv
- name: Install packages
working-directory: ${{ env.SUBDIRECTORY }}
run: uv sync --frozen --no-cache --no-install-project
- name: Build project
working-directory: ${{ env.SUBDIRECTORY }}
run: uv build
- id: wait-for-jobs
uses: yogeshlonkar/wait-for-jobs@v0
with:
gh-token: ${{ secrets.GITHUB_TOKEN }}
jobs: |
run_code_check_py3.9
run_code_check_py3.10
run_code_check_py3.11
run_code_check_py3.12
# Publish package on pypi
- name: Publish
if: github.ref == 'refs/heads/develop' && github.event_name == 'push'
working-directory: ${{ env.SUBDIRECTORY }}
continue-on-error: true
run: uv publish --token ${{ secrets.pypi_burny_common_token }}