Skip to content

Publish breadbox client #4

Publish breadbox client

Publish breadbox client #4

---
name: Publish breadbox client
on:
workflow_dispatch:
inputs:
tag:
description: "The tag/branch to checkout"
required: true
default: "master"
env:
POETRY_CACHE_DIR: "${{ env.HOME }}/.cache/pypoetry"

Check failure on line 12 in .github/workflows/publish_breadbox_client.yaml

View workflow run for this annotation

GitHub Actions / Publish breadbox client

Invalid workflow file

The workflow is not valid. .github/workflows/publish_breadbox_client.yaml (Line: 12, Col: 21): Unrecognized named-value: 'env'. Located at position 1 within expression: env.HOME
jobs:
publish-breadbox-client:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v3
with:
token: "${{ secrets.GITHUB_TOKEN }}"
fetch-depth: 0
- name: Authenticate to Google Cloud
uses: google-github-actions/auth@v2
with:
# See instructions here: https://github.com/google-github-actions/auth?tab=readme-ov-file#service-account-key-json
credentials_json: ${{ secrets.DEPMAP_ARTIFACTS_SVC_ACCT }}
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.7.1
virtualenvs-create: true
- name: Set up cache
uses: actions/cache@v2
id: cached-poetry-dependencies
with:
path: "${{ env.POETRY_CACHE_DIR }}"
key: "breadbox-venv-${{ runner.os }}-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('breadbox*/**/poetry.lock') }}"
- name: "Install breadbox python dependencies"
working-directory: "./breadbox"
run: "poetry install"
- name: "Install breadbox client generator dependencies"
working-directory: "./breadbox-client-generator"
run: "poetry install"
- name: "Export the breadbox API spec"
working-directory: "./breadbox"
run: "poetry run ./bb update-client"
- name: "peek at poetry cachedir"
run: "ls -l ${{ env.POETRY_CACHE_DIR }}/*"
- name: "Set up for publishing breadbox client"
working-directory: "./breadbox-client"
run: |
find ./breadbox_client
poetry self add keyrings.google-artifactregistry-auth
poetry config repositories.public-python https://us-central1-python.pkg.dev/cds-artifacts/public-python/
- name: "Publish new breadbox client version to Artifact Registry"
working-directory: "./breadbox-client"
run: |
poetry publish --build --repository public-python