Skip to content

Release

Release #54

Workflow file for this run

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"]
permissions: write-all
# IMPORTANT: this permission is mandatory for trusted publishing
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: Build
run: |
poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
env:
PASSWORD: ${{ secrets.pypi_password }}
USERNAME: Dolthub