v2.5.0 #47
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: Release | |
on: | |
release: | |
types: | |
- published | |
jobs: | |
checks: | |
name: Run checks workflow | |
uses: TransformerLensOrg/TransformerLens/.github/workflows/checks.yml@main | |
semver-parser: | |
name: Parse the semantic version from the release | |
runs-on: ubuntu-latest | |
steps: | |
- name: Parse semver string | |
id: semver_parser | |
uses: booxmedialtd/[email protected] | |
with: | |
input_string: ${{ github.event.release.tag_name }} | |
outputs: | |
major: "${{ steps.semver_parser.outputs.major }}" | |
minor: "${{ steps.semver_parser.outputs.minor }}" | |
patch: "${{ steps.semver_parser.outputs.patch }}" | |
semver: "${{ steps.semver_parser.outputs.fullversion }}" | |
release-python: | |
name: Release Python package to PyPi | |
needs: | |
- checks | |
- semver-parser | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Poetry | |
uses: snok/install-poetry@v1 | |
with: | |
version: 1.4.0 | |
- name: Poetry config | |
run: poetry self add 'poethepoet[poetry_plugin]' | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
cache: 'poetry' | |
- name: Install dependencies | |
run: poetry install --with dev | |
- name: Set the version | |
run: poetry version ${{needs.semver-parser.outputs.semver}} | |
- name: Build | |
run: poetry build | |
- name: Publish | |
run: poetry publish | |
env: | |
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN_PYPI }} |