Release #48
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 | |
on: | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'SemVer format release tag, i.e. 0.23.4' | |
required: true | |
jobs: | |
bump-version: | |
name: Bump Version and Release | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: ["3.10"] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python ${{ matrix.python_version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python_version }} | |
- uses: Gr1N/setup-poetry@v8 | |
- name: Install poetry dependencies | |
run: poetry install | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
- name: Update Doltcli version | |
run: | | |
sed -i 's/^version = \S*/version = "'"$VERSION"'"/' "$FILE" | |
env: | |
FILE: pyproject.toml | |
VERSION: ${{ github.event.inputs.version }} | |
- uses: EndBug/add-and-commit@v7 | |
with: | |
message: ${{ format('[ga-bump-release] update Doltcli version to {0}', github.event.inputs.version) }} | |
add: ${{ format('{0}/pyproject.toml', github.workspace) }} | |
cwd: "." | |
- name: Create Release | |
id: create_release | |
uses: actions/create-release@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
tag_name: v${{ github.event.inputs.version }} | |
release_name: ${{ github.event.inputs.version }} | |
draft: false | |
prerelease: false | |
- name: Publish | |
run: | | |
poetry config http-basic.pypi $USERNAME $PASSWORD | |
poetry build | |
poetry publish | |
env: | |
PASSWORD: ${{ secrets.pypi_password }} | |
USERNAME: Dolthub |