Skip to content

fix: fix release CI #36

fix: fix release CI

fix: fix release CI #36

Workflow file for this run

name: Release
on:
push:
branches:
- main
pull_request:
types:
- opened
- synchronize
permissions:
contents: read
jobs:
release:
permissions:
contents: write
pull-requests: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: pip
python-version: '3.10'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine bump2version git-changelog # better-exceptions(optional for debug)
- name: Bump version
run: |
git config --global user.name 'github-actions[bot]'
git config --global user.email 'github-actions[bot]@users.noreply.github.com'
bump2version patch
NEW_VERSION=$(grep -Po '(?<=^version = ")[^"]*' pyproject.toml)
echo "new_version=$NEW_VERSION" >> $GITHUB_ENV
echo "New version: $NEW_VERSION"
- name: Release please
uses: google-github-actions/release-please-action@v4
with:
token: ${{ secrets.PAT }}
release-type: simple
# package:
# needs: release
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - name: Set up Python
# uses: actions/setup-python@v5
# with:
# cache: pip
# python-version: '3.10'
# - run: env | sort
# - run: make dev
# - run: make build
# - env:
# TWINE_USERNAME: __token__
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
# run: |
# make upload