Bump github/codeql-action from 2 to 3 #91
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: "Release with commit" | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: ChanTsune/[email protected] | |
id: create_release | |
with: | |
regexp: "Release (\\d+([.]\\d+)*)\n*((\\s|\\S)+)" | |
regexp_options: "us" | |
release_name: "version $1" | |
tag_name: "v$1" | |
body: "$3" | |
draft: false | |
prerelease: false | |
env: | |
GITHUB_TOKEN: '${{secrets.GITHUB_TOKEN}}' | |
- uses: actions/checkout@v4 | |
if: ${{ steps.create_release.outputs.created == 'true' }} | |
- name: Set up Python | |
if: ${{ steps.create_release.outputs.created == 'true' }} | |
uses: actions/setup-python@v5 | |
with: | |
python-version: '3.x' | |
- name: Install dependencies | |
if: ${{ steps.create_release.outputs.created == 'true' }} | |
run: | | |
python -m pip install --upgrade pip | |
pip install setuptools twine wheel | |
- name: Build and publish | |
if: ${{ steps.create_release.outputs.created == 'true' }} | |
env: | |
TWINE_USERNAME: ${{ secrets.PYPI_USERNAME }} | |
TWINE_PASSWORD: ${{ secrets.PYPI_PASSWORD }} | |
run: | | |
python setup.py sdist bdist_wheel | |
twine upload dist/* |