Skip to content

Merge branch 'pub/auto-pypi' of https://github.com/siliconflow/onedif… #10

Merge branch 'pub/auto-pypi' of https://github.com/siliconflow/onedif…

Merge branch 'pub/auto-pypi' of https://github.com/siliconflow/onedif… #10

Workflow file for this run

name: Publish
on:
push:
branches:
- "pub/*"
schedule:
- cron: "0 1 * * *"
jobs:
publish:
if: github.repository == 'siliconflow/onediff'
runs-on: [ubuntu-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Get current date
id: date
run: |
sed -i '1d' "src/onediff/__init__.py"
formatted_date=$(date +'%Y%m%d%H%M')
echo "__version__ = \"0.12.1.dev${formatted_date}\"" >> src/onediff/__init__.py
- run: cat src/onediff/__init__.py
- run: python3 -m pip install build
- run: python3 -m build
- name: Publish package
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}