Skip to content

Merge pull request #57 from pedohorse/viewer-reconnect-message #13

Merge pull request #57 from pedohorse/viewer-reconnect-message

Merge pull request #57 from pedohorse/viewer-reconnect-message #13

Workflow file for this run

name: "PYPI publish"
on:
push:
tags: ["v*"]
jobs:
build:
runs-on: "ubuntu-latest"
strategy:
matrix:
build_thing:
- lifeblood
- lifeblood_viewer
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install --upgrade pip build
- name: build ${{ matrix.build_thing }}
run: |
cd pkg_${{ matrix.build_thing }}
VER=${{ github.ref_name }}
VER=${VER:1}
sed -i "s/version = 0.3.0/version = $VER/g" setup.cfg
./build_pypi.sh
- uses: actions/upload-artifact@4
with:
name: build_${{ matrix.build_thing }}
path: |
pkg_${{ matrix.build_thing }}/dist/*
build_all_tools:
uses: ./.github/workflows/build-tools.yml
make_release:
runs-on: "ubuntu-latest"
needs:
- build
- build_all_tools
steps:
- uses: actions/download-artifact@v4
with:
path:
tools
- run: |
VER=${{ github.ref_name }}
VER=${VER:1}
echo "PYPIVER=$VER" >> $GITHUB_ENV
- uses: softprops/action-gh-release@v1
with:
files:
tools/*/*
publish:
runs-on: "ubuntu-latest"
needs: [ "build" ]
strategy:
matrix:
the_thing:
- lifeblood
- lifeblood_viewer
steps:
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- name: "install requirements"
run: |
python -m pip install --upgrade pip twine
- uses: actions/download-artifact@v4
with:
name: build_${{ matrix.the_thing }}
path: stuff
- name: "upload to pypi"
env:
TWINE_PASSWORD: ${{ secrets.PYPI_RELEASE }}
run: |
python -m twine upload --repository pypi -u __token__ stuff/*
notify:
uses: ./.github/workflows/release-notify.yml
secrets:
TELEGRAM_INFO_BOT_ID: ${{ secrets.TELEGRAM_INFO_BOT_ID }}
TELEGRAM_INFO_CHANNEL_ID: ${{ secrets.TELEGRAM_INFO_CHANNEL_ID }}
with:
message_prepend: "🩸 Lifeblood update ${{ github.ref_name }}!\n\n"
message_body_command: "git tag -l --format='%(contents)' ${{ github.ref_name }}"
message_append: |-
https://github.com/${{ github.repository}}/releases/tag/${{ github.ref_name }}
https://pypi.org/project/lifeblood/
https://pypi.org/project/lifeblood-viewer/
#lifeblood
needs: [ "make_release" ]