Skip to content

VERSION = (7, 0, 0) #51

VERSION = (7, 0, 0)

VERSION = (7, 0, 0) #51

Workflow file for this run

# This workflow will upload a Python Package using Twine when a release is created
# For more information see: https://help.github.com/en/actions/language-and-framework-guides/using-python-with-github-actions#publishing-to-package-registries
# https://docs.github.com/en/actions/deployment/security-hardening-your-deployments/configuring-openid-connect-in-pypi
name: Upload Python Package
on:
push:
paths:
- 'rinch_sql/__version__.py'
# tags:
# - 'v*'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Create and push tag
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config --local user.email "rinch.wu@gmail.com"
git config --local user.name "rinch wu"
vversion=$(python rinch_sql/__version__.py)
git tag $vversion
git push origin --tags
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build setuptools setuptools-scm
- name: Build package
run: python -m build
# - name: Publish package
# uses: pypa/gh-action-pypi-publish@release/v1
- name: upload windows dists
uses: actions/upload-artifact@v3
with:
name: release-dists
path: dist/
pypi-publish:
runs-on: ubuntu-latest
needs:
- build
permissions:
id-token: write
steps:
- name: Retrieve release distributions
uses: actions/download-artifact@v3
with:
name: release-dists
path: dist/
- name: Publish release distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1