Skip to content

2. Build and Publish #48

2. Build and Publish

2. Build and Publish #48

name: 2. Build and Publish
on:
workflow_run:
workflows: ["1. Bump Version"]
types:
- completed
push:
tags:
- "*.*.*"
jobs:
# test:
# name: 2.1. Test
# runs-on: ubuntu-24.04
# permissions:
# contents: read
# steps:
# - name: Checkout
# uses: actions/checkout@v6
# - name: Set up Python
# uses: actions/setup-python@v6
# with:
# python-version: "3.10"
# - name: Install dependencies
# run: |
# python -m pip install -U pip
# python -m pip install .[test]
# - name: Test with pytest
# run: ./scripts/test.sh -l
build_publish:
# needs: test
name: Build and Publish
runs-on: ubuntu-24.04
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Get latest version
run: |
git pull origin main
echo "Current version: v$(./scripts/get-version.sh)"
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.10"
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -r ./requirements/requirements.build.txt
# - name: Build and publish package
# run: |
# echo -e "[testpypi]\nusername = __token__\npassword = ${{ secrets.TEST_PYPI_API_TOKEN }}" > ~/.pypirc
# ./scripts/build.sh -c -u
# rm -rfv ~/.pypirc
# run: |
# echo -e "[pypi]\nusername = __token__\npassword = ${{ secrets.PYPI_API_TOKEN }}" > ~/.pypirc
# ./scripts/build.sh -c -u -p
# rm -rfv ~/.pypirc
- name: Build the package
run: |
./scripts/build.sh -c
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GEMINI_API_KEY: ${{ secrets.GEMINI_API_KEY }}
USE_COMMIT_ANALYSIS: "true"
GEMINI_MODEL: ${{ secrets.GEMINI_MODEL }}
run: ./scripts/release.sh