Skip to content

extract package version number from latest tag #20

extract package version number from latest tag

extract package version number from latest tag #20

Workflow file for this run

name: Publish Python package
on:
push:
tags:
- "v*.*.*"
jobs:
test_package:
uses: ./.github/workflows/test_package.yml
build:
needs: test_package
permissions:
id-token: write
contents: read
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: 3.x
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install poetry
- name: Build the package
run: |
poetry version $(git describe --tags --abbrev=0)
poetry build
- name: Mint token
id: mint-token
uses: tschm/[email protected]
- name: Publish package
run: |
poetry publish -u __token__ -p '${{ steps.mint-token.outputs.api-token }}'