Skip to content

Merge pull request #33 from lakeraai/feature/rag-tutorial-fix #7

Merge pull request #33 from lakeraai/feature/rag-tutorial-fix

Merge pull request #33 from lakeraai/feature/rag-tutorial-fix #7

Workflow file for this run

# adapted from:
# https://til.simonwillison.net/pypi/pypi-releases-from-github
# https://github.com/snok/install-poetry
# https://jacobian.org/til/github-actions-poetry/
# https://github.com/orgs/community/discussions/25305#discussioncomment-8256560
name: Release Version
on:
push:
branches:
- main
tags-ignore:
- '**'
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: cache poetry install
uses: actions/cache@v2
with:
path: ~/.local
key: poetry
- uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: true
- name: Load cached venv
id: cached-poetry-dependencies
uses: actions/cache@v3
with:
path: .venv
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }}
- name: Install dependencies
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
run: poetry install --no-interaction --no-root
- name: Publish docs
env:
LAKERA_GUARD_API_KEY: ${{ secrets.LAKERA_GUARD_API_KEY }}
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
run: |
poetry run mkdocs gh-deploy --quiet --force
release:
needs: [docs]
runs-on: ubuntu-latest
concurrency: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.RELEASE_VERSION_BUMP_APP_ID }}
private-key: ${{ secrets.RELEASE_VERSION_BUMP_PRIVATE_KEY }}
- uses: actions/checkout@v4
with:
fetch-depth: 0
token: ${{ steps.app-token.outputs.token }}
- run: |
git config user.name github-actions
git config user.email [email protected]
- name: Python Semantic Release
uses: python-semantic-release/python-semantic-release@master
with:
github_token: ${{ steps.app-token.outputs.token }}