Skip to content

v0.2.15

v0.2.15 #29

Workflow file for this run

name: Publish to PyPI & Notify Discord
on:
release:
types: [published]
jobs:
build-and-publish:
name: Build and publish to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install build tools
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
# ---------------------------------------------------------
# NOTIFY DISCORD
# ---------------------------------------------------------
- name: Notify Discord (Announcements)
if: success()
uses: tsickert/discord-webhook@v5.3.0
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_ANNOUNCEMENTS }}
username: "Blizzer Bot"
avatar-url: "https://github.com/blizzertech.png"
content: "🚀 **New Release: Kiri OCR ${{ github.event.release.tag_name }}** is now live on PyPI!"
embed-title: "📦 Download on PyPI"
embed-url: "https://pypi.org/project/kiri-ocr/"
embed-description: "${{ github.event.release.body }}"
embed-color: 5814783 # A nice Blue/Purple color
- name: Notify Discord (Kiri OCR Channel)
if: success()
uses: tsickert/discord-webhook@v5.3.0
with:
webhook-url: ${{ secrets.DISCORD_WEBHOOK_OCR }}
username: "Blizzer Bot"
avatar-url: "https://github.com/blizzertech.png"
content: "👀 **Dev Update:** A new version of Kiri OCR (${{ github.event.release.tag_name }}) has just been published."
embed-title: "📜 Release Notes"
embed-url: "${{ github.event.release.html_url }}"
embed-description: "Check the full changelog on GitHub!"
embed-color: 3066993 # Green color for 'Success'