Skip to content

feat(ai-cli): add support for Google Gemini Model #39

feat(ai-cli): add support for Google Gemini Model

feat(ai-cli): add support for Google Gemini Model #39

Workflow file for this run

name: Release
on:
push:
tags:
- "*"
workflow_dispatch:
permissions:
actions: write
contents: write
jobs:
release:
name: release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v3
with:
python-version: 3.9
architecture: "x64"
- name: Install build tool
run: |
pip install -U build .
- name: Build artifacts
run: |
python -m build --sdist --wheel .
version=$(cd src && python -c "import ai_cli; print(ai_cli.__version__)")
echo "VERSION=${version}" >> $GITHUB_ENV
- name: Publish distribution 📦 to PyPI
if: startsWith(github.ref, 'refs/tags')
uses: pypa/gh-action-pypi-publish@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Get Changelog
id: get-changelog
run: |
awk '/-{3,}/{flag=1;next}/Release/{if (flag==1)exit}flag' CHANGELOG.md > .changelog.md
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: v${{ env.VERSION }}
release_name: Release ${{ env.VERSION }}
draft: false
body_path: .changelog.md
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./dist/py_ai_cli-${{ env.VERSION }}-py3-none-any.whl
asset_name: ai_cli-${{ env.VERSION }}-py3-none-any.whl
asset_content_type: application/zip