Skip to content

Merge pull request #6 from RyoJerryYu/feat-log-info-when-startup #18

Merge pull request #6 from RyoJerryYu/feat-log-info-when-startup

Merge pull request #6 from RyoJerryYu/feat-log-info-when-startup #18

Workflow file for this run

name: Create a Github Release
on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
- name: Run tests
run: make test
- name: Create Release
id: create_release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: |
LICENSE
tag_name: ${{ github.ref_name }}
release_name: Release ${{ github.ref_name }}
draft: false
prerelease: false
publish_pypi:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r requirements-dev.txt
pip install build twine
- name: Update version
run: |
sed -i "s/^version = \"0.0.0\"$/version = \"$GITHUB_REF_NAME\"/" pyproject.toml
- name: Build
run: python -m build
- name: Publish to PyPI
run: python -m twine upload --repository pypi dist/*
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}