Skip to content

Marks: prepare for dimensionality #7

Marks: prepare for dimensionality

Marks: prepare for dimensionality #7

Workflow file for this run

name: Release to Artifact Registry
on:
workflow_dispatch:
push:
branches:
- main
release:
types: [published]
jobs:
release:
runs-on: ubuntu-latest
permissions:
contents: 'write'
id-token: 'write'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: 3.11.5
- id: auth
uses: google-github-actions/auth@v2
with:
credentials_json: "${{ secrets.ARTIFACT_REGISTRY_KEY }}"
- name: Set up Cloud SDK
uses: google-github-actions/setup-gcloud@v2
# - name: Display gcloud info
# run: gcloud info
- name: Install and configure Poetry
uses: snok/install-poetry@v1
- name: Configure deploy keys
run: |
# poetry self add poetry-dynamic-versioning[plugin]
# poetry config pypi-token.pypi ${{ secrets.PYPI_API_KEY }}
poetry self add keyrings.google-artifactregistry-auth
poetry config repositories.gcp https://us-west1-python.pkg.dev/probcomp-caliban/probcomp/
- name: Install deps
run: poetry install
- name: Get current date and time
id: datetime
run: |
echo "RELEASE_DATE=$(date +'%Y.%m.%d.%H%M%S')" >> $GITHUB_ENV
- name: Update version in pyproject.toml
run: |
poetry version $(date +'%Y.%m.%d.%H%M%S')
- name: Create Git tag
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
git tag -a "v$(date +'%Y.%m.%d.%H%M%S')" -m "Release version $(date +'%Y.%m.%d.%H%M%S')"
git push origin --tags
- name: Deploy to Artifact Registry
run: poetry publish --build --repository gcp