v0.0.31 #24
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: Upload LangKit python Packages | |
on: | |
release: | |
types: [released] | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Poetry | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: 1.6.1 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
cache: poetry | |
- name: Install dependencies | |
run: poetry install | |
- name: Autobump version | |
run: | | |
# from refs/tags/v1.2.3 get 1.2.3 | |
VERSION=$(echo $GITHUB_REF | sed 's#.*/v##') | |
echo $VERSION | |
git config --local user.email "[email protected]" | |
git config --local user.name "github-actions[bot]" | |
poetry run bump2version patch --verbose --allow-dirty --commit --no-tag --new-version $VERSION | |
#push version bump to tagged branch so new version is included in pypi | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
branch: ${{ github.ref }} | |
force: true | |
- name: Build and publish LangKit to PyPI | |
run: poetry publish --build --username __token__ --password ${{ secrets.PYPI_API_TOKEN }} | |
bump_mainline: | |
runs-on: ubuntu-latest | |
needs: deploy | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Poetry | |
uses: abatilo/[email protected] | |
with: | |
poetry-version: 1.6.1 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.8" | |
cache: poetry | |
- name: Install dependencies | |
run: poetry install | |
- name: read current version | |
run: | | |
# from refs/tags/v1.2.3 get 1.2.3 | |
echo "VERSION=$(echo $GITHUB_REF | sed 's#.*/v##')" >> $GITHUB_ENV | |
- name: bump2version main to new release version | |
run: poetry run bump2version patch --verbose --allow-dirty --no-tag --new-version ${{ env.VERSION }} | |
- name: Create Pull Request | |
id: cpr | |
uses: peter-evans/create-pull-request@v5 | |
with: | |
token: ${{ secrets.VERSION_UPDATE_W0_AUTOMATOR }} | |
commit-message: Update version to ${{ env.VERSION }} | |
branch: update_release_version_${{ env.VERSION }} | |
base: main | |
delete-branch: true | |
title: "Bump version to ${{ env.VERSION }}" | |
committer: w0-automator <[email protected]> | |
author: w0-automator <[email protected]> |