AutoGPT/.github/workflows/classic-benchmark_publish_p...

56 lines
1.4 KiB
YAML
Raw Permalink Normal View History

name: Classic - Publish to PyPI
2023-07-22 15:08:03 +00:00
on:
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-latest
2023-07-23 19:32:23 +00:00
permissions:
contents: write
2023-07-22 15:08:03 +00:00
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
2023-07-22 15:08:03 +00:00
- name: Set up Python
uses: actions/setup-python@v5
2023-07-22 15:08:03 +00:00
with:
python-version: 3.8
- name: Install Poetry
working-directory: ./classic/benchmark/
2023-07-22 15:08:03 +00:00
run: |
curl -sSL https://install.python-poetry.org | python3 -
echo "$HOME/.poetry/bin" >> $GITHUB_PATH
2023-09-17 00:00:46 +00:00
2023-07-23 16:19:39 +00:00
- name: Build project for distribution
working-directory: ./classic/benchmark/
2023-07-23 16:19:39 +00:00
run: poetry build
2023-07-22 15:08:03 +00:00
- name: Install dependencies
working-directory: ./classic/benchmark/
2023-07-22 15:08:03 +00:00
run: poetry install
2023-09-17 00:00:46 +00:00
2023-07-23 16:19:39 +00:00
- name: Check Version
working-directory: ./classic/benchmark/
2023-07-23 16:19:39 +00:00
id: check-version
run: |
echo version=$(poetry version --short) >> $GITHUB_OUTPUT
- name: Create Release
uses: ncipollo/release-action@v1
with:
artifacts: "classic/benchmark/dist/*"
2023-07-23 16:19:39 +00:00
token: ${{ secrets.GITHUB_TOKEN }}
draft: false
2023-09-17 00:00:46 +00:00
generateReleaseNotes: false
tag: agbenchmark-v${{ steps.check-version.outputs.version }}
2023-07-23 16:19:39 +00:00
commit: master
2023-07-22 15:08:03 +00:00
- name: Build and publish
working-directory: ./classic/benchmark/
2023-07-23 16:19:39 +00:00
run: poetry publish -u __token__ -p ${{ secrets.PYPI_API_TOKEN }}