Rule export feature (#2) #9
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and Release Python Wheel | |
on: | |
push: | |
tags: | |
- 'v*' # Trigger on tags that start with 'v' | |
jobs: | |
build_and_release: | |
runs-on: ubuntu-latest | |
environment: release | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: 3.11 | |
- name: Install Dependencies | |
run: | | |
pip install poetry | |
- name: Build Wheel | |
run: | | |
poetry build | |
- name: Create Release and Upload Wheel | |
id: create_release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: dist/*.whl | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Publish to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
# below is for PyPi test | |
# with: | |
# repository-url: https://test.pypi.org/legacy/ |